release: v0.9.6 #48
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 Desktop Bundle | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| release-metadata: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| outputs: | |
| app_version: ${{ steps.version.outputs.app_version }} | |
| release_tag: ${{ steps.version.outputs.release_tag }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Read release metadata | |
| id: version | |
| shell: bash | |
| env: | |
| REF_TYPE: ${{ github.ref_type }} | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| app_version="$(node -p "require('./package.json').version")" | |
| if [[ "$REF_TYPE" == "tag" ]]; then | |
| release_tag="$REF_NAME" | |
| else | |
| release_tag="manual-v${app_version}-${GITHUB_RUN_NUMBER}" | |
| fi | |
| echo "app_version=${app_version}" >> "$GITHUB_OUTPUT" | |
| echo "release_tag=${release_tag}" >> "$GITHUB_OUTPUT" | |
| build-release: | |
| needs: release-metadata | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| artifact_name: museai-macos | |
| args: "--target aarch64-apple-darwin" | |
| bundles: | | |
| src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg | |
| src-tauri/target/aarch64-apple-darwin/release/bundle/macos/*.app | |
| - os: windows-latest | |
| artifact_name: museai-windows | |
| args: "" | |
| bundles: | | |
| src-tauri/target/release/bundle/nsis/*.exe | |
| src-tauri/target/release/bundle/msi/*.msi | |
| - os: ubuntu-22.04 | |
| artifact_name: museai-linux | |
| args: "" | |
| bundles: | | |
| src-tauri/target/release/bundle/appimage/*.AppImage | |
| src-tauri/target/release/bundle/deb/*.deb | |
| src-tauri/target/release/bundle/rpm/*.rpm | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.os == 'macos-latest' && 'aarch64-apple-darwin' || '' }} | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Install Linux system dependencies | |
| if: matrix.os == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Install macOS DMG dependencies | |
| if: matrix.os == 'macos-latest' | |
| run: brew install create-dmg | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Build Tauri release assets | |
| run: npm run tauri -- build ${{ matrix.args }} | |
| - name: Upload workflow artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: ${{ matrix.bundles }} | |
| publish-release: | |
| needs: | |
| - release-metadata | |
| - build-release | |
| if: ${{ needs.build-release.result == 'success' }} | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download workflow artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-artifacts | |
| - name: Publish GitHub release assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.release-metadata.outputs.release_tag }} | |
| name: MuseAI v${{ needs.release-metadata.outputs.app_version }} | |
| body: See the assets to download and install this release. | |
| draft: ${{ github.event_name == 'workflow_dispatch' }} | |
| prerelease: false | |
| generate_release_notes: true | |
| files: | | |
| release-artifacts/**/*.dmg | |
| release-artifacts/**/*.exe | |
| release-artifacts/**/*.msi | |
| release-artifacts/**/*.AppImage | |
| release-artifacts/**/*.deb | |
| release-artifacts/**/*.rpm |