Skip to content

Commit a17d907

Browse files
committed
fix: ensure desktop builds always run on main pushes and use latest release tag
1 parent b60c84d commit a17d907

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
name: Build Desktop Apps
8080
needs: release
8181
runs-on: ${{ matrix.os }}
82-
if: needs.release.outputs.released == 'true'
82+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
8383

8484
strategy:
8585
matrix:
@@ -120,10 +120,16 @@ jobs:
120120
- name: Build desktop app
121121
run: cd apps/desktop && npm run build:${{ matrix.platform }}
122122

123+
- name: Get latest release
124+
id: latest_release
125+
run: |
126+
LATEST_TAG=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r .tag_name)
127+
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
128+
123129
- name: Upload artifacts to latest release
124130
uses: softprops/action-gh-release@v1
125131
with:
126-
tag_name: v${{ needs.release.outputs.version }}
132+
tag_name: ${{ steps.latest_release.outputs.tag }}
127133
files: |
128134
apps/desktop/dist/*.exe
129135
apps/desktop/dist/*.dmg

0 commit comments

Comments
 (0)