-
Notifications
You must be signed in to change notification settings - Fork 36
71 lines (71 loc) · 2.25 KB
/
ci.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
68
69
70
71
name: CI
on: [push, pull_request]
jobs:
build-objexport:
name: Build objexport
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Restore
working-directory: tools/objexport
run: dotnet restore
- name: Build
working-directory: tools/objexport
run: dotnet build --configuration Release --no-restore
- name: Test
working-directory: tools/objexport
run: |
dotnet run --no-restore || ec=$?
if [ $ec = 1 ]; then
exit 0
else
exit 1
fi
- name: Publish (linux-x64)
working-directory: tools/objexport
run: dotnet publish -c Release -r linux-x64 -o ../../artifacts
- name: Publish (win-x64)
working-directory: tools/objexport
run: dotnet publish -c Release -r win-x64 -o ../../artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: "objexport"
path: |
artifacts/objexport
artifacts/objexport.exe
build-objects:
name: Build objects
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download gxc
run: |
curl -Lo tools.tar.gz https://github.com/IntelOrca/libsawyer/releases/download/v1.3.0/libsawyer-tools-linux-x64.tar.gz
mkdir -p "$GITHUB_WORKSPACE/bin"
tar -C "$GITHUB_WORKSPACE/bin" -xf tools.tar.gz
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Create objects.zip
run: ./build.mjs
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: "OpenRCT2 Objects"
path: artifacts/objects.zip
- name: Calculate SHA1
run: |
echo "SHA1=$(sha1sum artifacts/objects.zip | awk '{printf $1}')" >> $GITHUB_OUTPUT
id: calculate_sha1
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
fail_on_unmatched_files: true
files: artifacts/objects.zip
body: SHA1:${{ steps.calculate_sha1.outputs.SHA1 }}