-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.38 KB
/
build-and-upload-release-assets.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
on:
workflow_dispatch:
inputs:
version:
description: "Version of the release, should match an existing tag name. E.g. v0.1.0"
required: true
jobs:
stickdeck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
# run tests
- run: cd deck && cargo test
# build the binary
- run: cd deck && cargo build --release
# zip files
- run: |
mkdir dist
cp deck/target/release/stickdeck dist/
chmod +x deck/scripts/setup.sh
cp deck/scripts/setup.sh dist/
chmod +x deck/scripts/launch.sh
cp deck/scripts/launch.sh dist/
chmod +x deck/scripts/debug.sh
cp deck/scripts/debug.sh dist/
cp deck/stickdeck.vdf dist/
cp deck/steamworks_sdk_154/libsteam_api.so dist/
echo 480 > dist/steam_appid.txt
zip -j stickdeck-${{ inputs.version }}.zip dist/*
# delete the asset if it already exists
- run: gh release delete-asset ${{ inputs.version }} stickdeck-${{ inputs.version }}.zip -y
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# upload the asset
- run: gh release upload ${{ inputs.version }} stickdeck-${{ inputs.version }}.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}