-
Notifications
You must be signed in to change notification settings - Fork 18
46 lines (43 loc) · 1.37 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build RetakesAllocator.zip
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore Dependencies
run: dotnet restore
- name: Build
shell: bash
run: dotnet build --no-restore -c Release
- name: Package
working-directory: ${{github.workspace}}/RetakesAllocator/
run: chmod +x release.bash; ./release.bash
- name: Publish Archive for Branch
uses: actions/upload-artifact@v4
if: "!startsWith(github.ref, 'refs/tags/')"
with:
name: RetakesAllocator-${{github.sha}}
path: ${{github.workspace}}/RetakesAllocator/bin/Release/RetakesAllocator
- name: Publish Archive for Release
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
name: RetakesAllocator-${{github.ref_name}}
path: ${{github.workspace}}/RetakesAllocator/bin/Release/RetakesAllocator
- name: Attach Release Files
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: RetakesAllocator-${{github.ref_name}}