Publish #12
This file contains hidden or 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
| name: Publish | |
| on: workflow_dispatch | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-13, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/checkout@v5 | |
| with: | |
| repository: "rlabrecque/SteamworksSDK" | |
| sparse-checkout: redistributable_bin | |
| path: steamworks-sdk | |
| - uses: hecrj/setup-rust-action@v2 | |
| with: | |
| rust-version: nightly | |
| - name: Install Dependencies | |
| if: runner.os == 'Linux' | |
| run: sudo apt install libasound2-dev | |
| - name: Build with Steam | |
| run: cargo build -r -p beam_time -F steam | |
| env: | |
| BEAMTIME_HMAC: ${{ secrets.BEAMTIME_HMAC }} | |
| - name: Package for Steam | |
| run: | | |
| mkdir dist | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| cp target/release/beam_time dist | |
| cp steamworks-sdk/redistributable_bin/linux64/libsteam_api.so dist | |
| elif [ "$RUNNER_OS" == "Windows" ]; then | |
| cp target/release/beam_time.exe dist | |
| cp steamworks-sdk/redistributable_bin/win64/steam_api64.dll dist | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| cp -r beam_time/dist/Beam\ Time.app dist | |
| mkdir dist/Beam\ Time.app/Contents/MacOS | |
| cp target/release/beam_time dist/Beam\ Time.app/Contents/MacOS | |
| cp steamworks-sdk/redistributable_bin/osx/libsteam_api.dylib dist/Beam\ Time.app/Contents/MacOS | |
| else | |
| echo "$RUNNER_OS not supported" | |
| exit 1 | |
| fi | |
| shell: bash | |
| - name: Upload Zipped Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: beam_time-${{ runner.os }} | |
| path: dist/* |