-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (56 loc) · 1.64 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Compile
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
configuration: [Debug, Release]
name: Z64Utils-${{ matrix.configuration }}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
restore_args: ''
build_args: --no-self-contained --configuration ${{ matrix.configuration }} --version-suffix ${{ github.sha }}
archive_name: Z64Utils-${{ matrix.configuration }}-${{ github.sha }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: dotnet info
shell: bash
run: |
dotnet --info
- name: dotnet restore
shell: bash
run: |
dotnet restore ${{ env.restore_args }}
- name: dotnet build
shell: bash
run: |
dotnet build ${{ env.restore_args }} ${{ env.build_args }}
- name: dotnet publish
shell: bash
run: |
dotnet publish --output publish_out/ ${{ env.restore_args }} ${{ env.build_args }}
- uses: actions/checkout@v4
with:
repository: zeldaret/Z64Utils
ref: config
path: Z64Utils-Config
fetch-depth: 0
- name: Copy versions data
shell: bash
run: |
cp -r -t publish_out/ Z64Utils-Config/versions
# Archive
- name: Create archive
shell: bash
run: |
cd publish_out
tar -czvf ../${{ env.archive_name }}.tar.gz *
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: ${{ env.archive_name }}
path: |
${{ env.archive_name }}.tar.gz