feat: add nexus-explorer Tauri desktop app with CI release pipeline #2
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: Build and Release NexusDB Explorer | |
| on: | |
| push: | |
| tags: | |
| - 'explorer-v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version tag (e.g., explorer-v0.1.0)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| create_release: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| release_id: ${{ steps.create_release.outputs.id }} | |
| tag_name: ${{ steps.tag.outputs.tag }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine tag | |
| id: tag | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "tag=${{ inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create GitHub Release | |
| id: create_release | |
| uses: zendesk/action-create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.tag.outputs.tag }} | |
| release_name: NexusDB Explorer ${{ steps.tag.outputs.tag }} | |
| draft: false | |
| prerelease: false | |
| build-macos-aarch64: | |
| needs: create_release | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: nexus-explorer/src/frontend/pnpm-lock.yaml | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin | |
| - name: Install frontend dependencies | |
| run: | | |
| cd nexus-explorer/src/frontend | |
| pnpm install | |
| - name: Build .app and .dmg | |
| run: | | |
| cd nexus-explorer | |
| cargo tauri build --bundles app,dmg --target aarch64-apple-darwin | |
| - name: Upload .app | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ needs.create_release.outputs.upload_url }} | |
| asset_path: target/aarch64-apple-darwin/release/bundle/macos/NexusDB Explorer.app | |
| asset_name: NexusDB-Explorer-aarch64.app.zip | |
| asset_content_type: application/zip | |
| - name: Upload .dmg | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ needs.create_release.outputs.upload_url }} | |
| asset_path: target/aarch64-apple-darwin/release/bundle/dmg/NexusDB Explorer_${{ needs.create_release.outputs.tag_name }}_aarch64.dmg | |
| asset_name: NexusDB-Explorer-${{ needs.create_release.outputs.tag_name }}-aarch64.dmg | |
| asset_content_type: application/x-apple-diskimage | |
| build-macos-x86_64: | |
| needs: create_release | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: nexus-explorer/src/frontend/pnpm-lock.yaml | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-apple-darwin | |
| - name: Install frontend dependencies | |
| run: | | |
| cd nexus-explorer/src/frontend | |
| pnpm install | |
| - name: Build .app and .dmg | |
| run: | | |
| cd nexus-explorer | |
| cargo tauri build --bundles app,dmg --target x86_64-apple-darwin | |
| - name: Upload .dmg | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ needs.create_release.outputs.upload_url }} | |
| asset_path: target/x86_64-apple-darwin/release/bundle/dmg/NexusDB Explorer_${{ needs.create_release.outputs.tag_name }}_x86_64.dmg | |
| asset_name: NexusDB-Explorer-${{ needs.create_release.outputs.tag_name }}-x86_64.dmg | |
| asset_content_type: application/x-apple-diskimage |