|
19 | 19 | jobs: |
20 | 20 | prepare: |
21 | 21 | runs-on: ubuntu-latest |
| 22 | + permissions: |
| 23 | + contents: write |
22 | 24 | outputs: |
23 | | - should_release: ${{ steps.check.outputs.should_release }} |
| 25 | + should_release: ${{ steps.vars.outputs.should_release }} |
24 | 26 | new_sha: ${{ steps.bump.outputs.new_sha }} |
| 27 | + release_id: ${{ steps.create_release.outputs.id }} |
25 | 28 | steps: |
26 | 29 | - uses: actions/checkout@v5 |
27 | 30 | with: |
@@ -52,12 +55,41 @@ jobs: |
52 | 55 | git tag "desktop-v$NEW_VERSION" |
53 | 56 | git push origin HEAD --tags |
54 | 57 | echo "new_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT |
| 58 | + echo "tag_name=desktop-v$NEW_VERSION" >> $GITHUB_OUTPUT |
| 59 | + echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT |
55 | 60 |
|
56 | | - - name: Check Status |
57 | | - id: check |
| 61 | + - name: Set Variables |
| 62 | + id: vars |
58 | 63 | run: | |
| 64 | + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then |
| 65 | + echo "tag_name=${{ steps.bump.outputs.tag_name }}" >> $GITHUB_OUTPUT |
| 66 | + echo "version=${{ steps.bump.outputs.version }}" >> $GITHUB_OUTPUT |
| 67 | + else |
| 68 | + echo "tag_name=${{ github.ref_name }}" >> $GITHUB_OUTPUT |
| 69 | + VERSION=$(echo "${{ github.ref_name }}" | sed 's/desktop-v//') |
| 70 | + echo "version=$VERSION" >> $GITHUB_OUTPUT |
| 71 | + fi |
59 | 72 | echo "should_release=true" >> $GITHUB_OUTPUT |
60 | 73 |
|
| 74 | + - name: Create Release |
| 75 | + id: create_release |
| 76 | + uses: softprops/action-gh-release@v2 |
| 77 | + with: |
| 78 | + tag_name: ${{ steps.vars.outputs.tag_name }} |
| 79 | + name: "Basetrack Desktop Companion v${{ steps.vars.outputs.version }}" |
| 80 | + body: | |
| 81 | + ## Basetrack Desktop v${{ steps.vars.outputs.version }} |
| 82 | + |
| 83 | + This is the latest release for Basetrack Desktop Companion. |
| 84 | + Please download the appropriate installer for your operating system from the assets below. |
| 85 | + |
| 86 | + ### Supported Platforms |
| 87 | + - **Windows**: `.msi`, `.exe` |
| 88 | + - **macOS**: `.dmg`, `.app.tar.gz` (Intel & Apple Silicon) |
| 89 | + - **Linux**: `.deb`, `.rpm`, `.AppImage` |
| 90 | + draft: true |
| 91 | + prerelease: false |
| 92 | + |
61 | 93 | release: |
62 | 94 | needs: prepare |
63 | 95 | if: needs.prepare.outputs.should_release == 'true' |
@@ -111,16 +143,12 @@ jobs: |
111 | 143 | sudo apt-get update |
112 | 144 | sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf |
113 | 145 |
|
114 | | - - name: Build Tauri App and Create Release |
| 146 | + - name: Build Tauri App and Upload Assets |
115 | 147 | uses: tauri-apps/tauri-action@v0 |
116 | 148 | env: |
117 | 149 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
118 | 150 | with: |
119 | 151 | projectPath: "./apps/desktop" |
120 | | - tagName: desktop-v__VERSION__ |
121 | | - releaseName: "Basetrack Desktop v__VERSION__" |
122 | | - releaseBody: "See the assets to download this version and install." |
123 | | - releaseDraft: true |
124 | | - prerelease: false |
| 152 | + releaseId: ${{ needs.prepare.outputs.release_id }} |
125 | 153 | includeUpdaterJson: false |
126 | 154 | args: ${{ matrix.args }} |
0 commit comments