[canary] Bump version to 2026.1.0-canary.2 #6
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| env: | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| github-release: | |
| name: "Create GitHub Release" | |
| runs-on: ubuntu-slim | |
| outputs: | |
| version: ${{ steps.get_version.outputs.VERSION }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if ${{ contains(steps.get_version.outputs.VERSION, 'canary') }}; then | |
| gh release create ${{ steps.get_version.outputs.VERSION }} \ | |
| --prerelease \ | |
| --title "${{ steps.get_version.outputs.VERSION }}" \ | |
| --notes "Release ${{ steps.get_version.outputs.VERSION }}" | |
| else | |
| gh release create ${{ steps.get_version.outputs.VERSION }} \ | |
| --title "${{ steps.get_version.outputs.VERSION }}" \ | |
| --notes "Release ${{ steps.get_version.outputs.VERSION }}" | |
| fi | |
| build-prebuilt: | |
| name: "Build prebuilt (${{ matrix.target }})" | |
| needs: github-release | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: ubuntu-24.04_x86_64 | |
| os: ubuntu-24.04 | |
| - target: ubuntu-24.04_arm64 | |
| os: ubuntu-24.04-arm | |
| - target: ubuntu-22.04_x86_64 | |
| os: ubuntu-22.04 | |
| - target: ubuntu-22.04_arm64 | |
| os: ubuntu-22.04-arm | |
| - target: macos_arm64 | |
| os: macos-15 | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - run: rustup update stable | |
| - name: Install build dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libclang-dev libasound2-dev libpulse-dev libx11-dev libxext-dev libxfixes-dev libxrandr-dev libxi-dev | |
| - name: Build with source-build | |
| run: cargo build --release --features source-build --message-format=json > build-output.json | |
| - name: Find OUT_DIR | |
| id: find_out_dir | |
| run: | | |
| OUT_DIR=$(jq -r 'select(.reason == "build-script-executed") | select(.package_id | contains("raw_player")) | .out_dir' build-output.json | head -1) | |
| echo "OUT_DIR=${OUT_DIR}" >> $GITHUB_OUTPUT | |
| - name: Create prebuilt archive | |
| run: | | |
| mkdir -p staging | |
| cp ${{ steps.find_out_dir.outputs.OUT_DIR }}/lib/libSDL3.a staging/ | |
| cp ${{ steps.find_out_dir.outputs.OUT_DIR }}/bindings.rs staging/ | |
| tar czf libSDL3-${{ matrix.target }}.tar.gz -C staging . | |
| - name: Generate SHA256 checksum | |
| run: | | |
| if command -v sha256sum &> /dev/null; then | |
| sha256sum libSDL3-${{ matrix.target }}.tar.gz > libSDL3-${{ matrix.target }}.tar.gz.sha256 | |
| else | |
| shasum -a 256 libSDL3-${{ matrix.target }}.tar.gz > libSDL3-${{ matrix.target }}.tar.gz.sha256 | |
| fi | |
| - name: Upload prebuilt archive | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload ${{ needs.github-release.outputs.version }} \ | |
| libSDL3-${{ matrix.target }}.tar.gz \ | |
| libSDL3-${{ matrix.target }}.tar.gz.sha256 \ | |
| --clobber | |
| build-prebuilt-windows: | |
| name: "Build prebuilt (windows_x86_64)" | |
| needs: github-release | |
| permissions: | |
| contents: write | |
| runs-on: windows-2025 | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - run: rustup update stable | |
| - name: Build with source-build | |
| run: cargo build --release --features source-build --message-format=json > build-output.json | |
| - name: Find OUT_DIR and create prebuilt archive | |
| shell: pwsh | |
| run: | | |
| $outDir = Get-Content build-output.json | ConvertFrom-Json | Where-Object { $_.reason -eq "build-script-executed" -and $_.package_id -match "raw_player" } | Select-Object -First 1 -ExpandProperty out_dir | |
| New-Item -ItemType Directory -Force -Path staging | |
| Copy-Item "$outDir/lib/SDL3-static.lib" staging/ | |
| Copy-Item "$outDir/bindings.rs" staging/ | |
| tar czf libSDL3-windows_x86_64.tar.gz -C staging . | |
| - name: Generate SHA256 checksum | |
| shell: pwsh | |
| run: | | |
| $hash = (Get-FileHash -Algorithm SHA256 libSDL3-windows_x86_64.tar.gz).Hash.ToLower() | |
| "$hash libSDL3-windows_x86_64.tar.gz" | Out-File -Encoding ascii libSDL3-windows_x86_64.tar.gz.sha256 | |
| - name: Upload prebuilt archive | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload ${{ needs.github-release.outputs.version }} ` | |
| libSDL3-windows_x86_64.tar.gz ` | |
| libSDL3-windows_x86_64.tar.gz.sha256 ` | |
| --clobber | |
| publish: | |
| needs: [github-release, build-prebuilt, build-prebuilt-windows] | |
| runs-on: ubuntu-24.04 | |
| environment: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: rust-lang/crates-io-auth-action@v1 | |
| id: auth | |
| - run: cargo publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| slack_notify: | |
| needs: [github-release, build-prebuilt, build-prebuilt-windows, publish] | |
| timeout-minutes: 20 | |
| runs-on: ubuntu-slim | |
| if: ${{ always() }} | |
| permissions: | |
| actions: read | |
| steps: | |
| - name: Slack Notification | |
| uses: shiguredo/github-actions/.github/actions/slack-notify@main | |
| with: | |
| status: ${{ job.status }} | |
| slack_webhook: ${{ secrets.SLACK_WEBHOOK }} | |
| slack_channel: rust-oss | |
| notify_mode: failure_and_fixed |