chore: bump version to 0.16.1 #57
Workflow file for this run
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: "Steam Deploy" | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| env: | |
| STEAMWORKS_SDK_COMMIT: "494c2d680b9e47bbc369496b57568f44ef2f6796" | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: read | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'npm' | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| shared-key: steam-windows | |
| - name: Cache Steamworks SDK | |
| id: cache-steamworks | |
| uses: actions/cache@v4 | |
| with: | |
| path: steamworks_sdk | |
| key: steamworks-sdk-${{ env.STEAMWORKS_SDK_COMMIT }} | |
| - name: Download Steamworks SDK | |
| if: steps.cache-steamworks.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| $commit = "$env:STEAMWORKS_SDK_COMMIT" | |
| Invoke-WebRequest -Uri "https://github.com/rlabrecque/SteamworksSDK/archive/$commit.zip" -OutFile "steamworks_sdk.zip" | |
| Expand-Archive -Path "steamworks_sdk.zip" -DestinationPath "." | |
| Move-Item "SteamworksSDK-$commit" "steamworks_sdk" | |
| - name: Install Steam SDK library | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path "src-tauri/resources" | |
| Copy-Item "steamworks_sdk/redistributable_bin/win64/steam_api64.dll" -Destination "src-tauri/resources/" | |
| - name: Install frontend dependencies | |
| run: npm install | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0.6.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| STEAM_APP_ID: "4313790" | |
| STEAM_APP_NAME: "production" | |
| with: | |
| args: --features cm_ss13,steam --config src-tauri/tauri.cm.conf.json --config src-tauri/tauri.steam.conf.json | |
| - name: Prepare Windows artifacts | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path steam-build/windows | |
| Copy-Item "src-tauri/target/release/CM_Launcher.exe" -Destination "steam-build/windows/" | |
| Copy-Item "src-tauri/resources/steam_api64.dll" -Destination "steam-build/windows/" | |
| - name: Scan with Windows Defender | |
| uses: ./.github/actions/defender-scan | |
| with: | |
| exe_path: steam-build/windows/CM_Launcher.exe | |
| build_name: "Steam ${{ github.ref_name }}" | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload Windows build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-build-production | |
| path: steam-build/windows/ | |
| retention-days: 1 | |
| build-linux: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'npm' | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| shared-key: steam-linux | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Cache Wine build | |
| id: cache-wine | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| src-tauri/wine.tar.zst | |
| src-tauri/winetricks | |
| src-tauri/cabextract | |
| key: wine-10.5-${{ hashFiles('scripts/download-wine.sh') }} | |
| - name: Download Wine | |
| if: steps.cache-wine.outputs.cache-hit != 'true' | |
| run: ./scripts/download-wine.sh | |
| - name: Cache Steamworks SDK | |
| id: cache-steamworks | |
| uses: actions/cache@v4 | |
| with: | |
| path: steamworks_sdk | |
| key: steamworks-sdk-${{ env.STEAMWORKS_SDK_COMMIT }} | |
| - name: Download Steamworks SDK | |
| if: steps.cache-steamworks.outputs.cache-hit != 'true' | |
| run: | | |
| curl -L "https://github.com/rlabrecque/SteamworksSDK/archive/$STEAMWORKS_SDK_COMMIT.zip" -o steamworks_sdk.zip | |
| unzip steamworks_sdk.zip | |
| mv "SteamworksSDK-$STEAMWORKS_SDK_COMMIT" steamworks_sdk | |
| - name: Install Steam SDK library | |
| run: | | |
| mkdir -p src-tauri/resources | |
| cp steamworks_sdk/redistributable_bin/linux64/libsteam_api.so src-tauri/resources/ | |
| sudo cp steamworks_sdk/redistributable_bin/linux64/libsteam_api.so /usr/lib/ | |
| sudo ldconfig | |
| - name: Install frontend dependencies | |
| run: npm install | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0.6.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| APPIMAGE_EXTRACT_AND_RUN: 1 | |
| LD_LIBRARY_PATH: /usr/lib:${{ github.workspace }}/src-tauri/resources | |
| STEAM_APP_ID: "4313790" | |
| STEAM_APP_NAME: "production" | |
| with: | |
| args: --features cm_ss13,steam --config src-tauri/tauri.cm.conf.json --config src-tauri/tauri.steam.conf.json --config src-tauri/tauri.linux.conf.json | |
| - name: Extract AppImage and prepare artifacts | |
| run: | | |
| APPIMAGE=$(find src-tauri/target/release/bundle -name "*.AppImage" | head -1) | |
| chmod +x "$APPIMAGE" | |
| "$APPIMAGE" --appimage-extract | |
| mkdir -p steam-build/linux | |
| cp -r squashfs-root/* steam-build/linux/ | |
| cp src-tauri/resources/libsteam_api.so steam-build/linux/usr/lib/ | |
| LIB_DIR="steam-build/linux/usr/lib/x86_64-linux-gnu" | |
| mkdir -p "$LIB_DIR" | |
| for lib in libfreetype libfontconfig libharfbuzz libpng libbrotlidec libbrotlicommon; do | |
| cp -L /usr/lib/x86_64-linux-gnu/${lib}.so* "$LIB_DIR/" 2>/dev/null || true | |
| done | |
| mkdir -p steam-build/linux/usr/etc/fonts | |
| cp -r /etc/fonts/* steam-build/linux/usr/etc/fonts/ 2>/dev/null || true | |
| cp scripts/steam-launch.sh steam-build/linux/launch.sh | |
| chmod +x steam-build/linux/launch.sh | |
| - name: Upload Linux build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build-production | |
| path: steam-build/linux/ | |
| retention-days: 1 | |
| deploy-steam-production: | |
| needs: [build-windows, build-linux] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Deploy to Steam | |
| uses: ./.github/actions/steam-deploy | |
| with: | |
| variant: production | |
| steam_app_id: "4313790" | |
| steam_app_name: "production" | |
| steam_username: ${{ secrets.STEAM_USERNAME }} | |
| steam_password: ${{ secrets.STEAM_PASSWORD }} | |
| steam_shared_secret: ${{ secrets.STEAM_SHARED_SECRET }} |