# atmosphere · release.yml · On a version tag, builds and signs every platform and publishes a GitHub Release with latest.json for in-app updates. name: release on: push: tags: ["v*"] permissions: contents: write jobs: check: runs-on: ubuntu-22.04 outputs: version: ${{ steps.v.outputs.version }} notes: ${{ steps.v.outputs.notes }} steps: - uses: actions/checkout@v4 - id: v name: Tag matches the app version run: | version=$(jq -r .version tauri.conf.json) cargo_version=$(grep -m1 '^version' Cargo.toml | cut -d'"' -f2) tag="${GITHUB_REF_NAME#v}" if [ "$version" != "$tag" ] || [ "$cargo_version" != "$tag" ]; then echo "::error::Tag v$tag doesn't match tauri.conf.json ($version) and Cargo.toml ($cargo_version)." exit 1 fi echo "version=$version" >> "$GITHUB_OUTPUT" { echo "notes<> "$GITHUB_OUTPUT" publish: needs: check strategy: fail-fast: false matrix: include: - os: windows-latest name: windows-x64 - os: macos-latest name: macos-arm64 - os: macos-13 name: macos-x64 - os: ubuntu-22.04 name: linux-x64 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Linux system libraries if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev patchelf - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: Tests run: cargo test --locked - name: Install Tauri CLI run: cargo install tauri-cli --version "^2" --locked - name: Build, sign and publish uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: "" with: tauriScript: cargo tauri tagName: v__VERSION__ releaseName: Atmosphere __VERSION__ releaseBody: ${{ needs.check.outputs.notes }} releaseDraft: false prerelease: false includeUpdaterJson: true - name: Portable executable if: runner.os == 'Windows' shell: bash env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cp target/release/atmosphere.exe "Atmosphere_${{ needs.check.outputs.version }}_x64-portable.exe" gh release upload "$GITHUB_REF_NAME" "Atmosphere_${{ needs.check.outputs.version }}_x64-portable.exe" --clobber