chore(release): 1.21.0 #36
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: 'app-macos' | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-macos: | |
| runs-on: 'macos-latest' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: 26.x | |
| package-manager-cache: false | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v 1.94.1 | |
| with: | |
| toolchain: stable | |
| - name: Write mah build config | |
| run: | | |
| echo "{\"name\": \"Mah\", \"mobile\":true}" > custom-build-config.json | |
| - name: Install mah dependencies | |
| run: npm ci | |
| - name: Install tauri dependencies | |
| run: cd resources/apps && npm ci | |
| - name: Build macOS DMG | |
| run: | | |
| cd resources/apps | |
| npm run macos | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: github.ref_type != 'tag' | |
| with: | |
| name: 'macos' | |
| retention-days: 10 | |
| path: resources/apps/tauri/target/**/*.dmg | |
| - name: Wait for release | |
| if: github.ref_type == 'tag' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| for i in $(seq 1 20); do | |
| gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1 && exit 0 | |
| echo "Waiting for release to be created ($i/20)..." | |
| sleep 30 | |
| done | |
| echo "Release not found after waiting" && exit 1 | |
| - name: Upload release | |
| if: github.ref_type == 'tag' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| find resources/apps/tauri/target -name "*.dmg" \ | |
| -exec gh release upload "$GITHUB_REF_NAME" {} \; |