.github/workflows/build-and-upload-release-assets.yml #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |