Launcher Release #1
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: Launcher Release | |
| on: | |
| push: | |
| tags: | |
| - "v*-launcher" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Release tag to create, for example v0.1.0-launcher" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build release | |
| working-directory: launcher/codaro-launcher | |
| run: cargo build --release | |
| - name: Compute SHA256 | |
| shell: pwsh | |
| run: | | |
| $hash = (Get-FileHash "launcher/target/release/codaro-launcher.exe" -Algorithm SHA256).Hash.ToLower() | |
| "$hash CodaroLauncher.exe" | Out-File -FilePath "launcher/target/release/CodaroLauncher.exe.sha256" -Encoding utf8 | |
| - name: Rename binary | |
| shell: pwsh | |
| run: | | |
| Copy-Item "launcher/target/release/codaro-launcher.exe" "launcher/target/release/CodaroLauncher.exe" | |
| - name: Generate SPDX SBOM | |
| uses: anchore/sbom-action@v0 | |
| with: | |
| path: launcher/codaro-launcher | |
| format: spdx-json | |
| output-file: launcher/target/release/CodaroLauncher.spdx.json | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ env.RELEASE_TAG }} | |
| target_commitish: ${{ github.sha }} | |
| name: Codaro Launcher ${{ env.RELEASE_TAG }} | |
| fail_on_unmatched_files: true | |
| body: | | |
| Download `CodaroLauncher.exe`, verify `CodaroLauncher.exe.sha256`, then run the launcher. | |
| The release also includes `CodaroLauncher.spdx.json` for dependency transparency. | |
| files: | | |
| launcher/target/release/CodaroLauncher.exe | |
| launcher/target/release/CodaroLauncher.exe.sha256 | |
| launcher/target/release/CodaroLauncher.spdx.json | |
| generate_release_notes: true |