chore: bump version to 0.8.27 #72
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate-changelog: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Check CHANGELOG.md contains version entry | |
| run: | | |
| if ! grep -q "\[${{ steps.version.outputs.version }}\]" CHANGELOG.md; then | |
| echo "::error::CHANGELOG.md has no entry for version ${{ steps.version.outputs.version }}" | |
| exit 1 | |
| fi | |
| - name: Extract changelog for this version | |
| id: changelog | |
| run: | | |
| version="${{ steps.version.outputs.version }}" | |
| # Extract content between this version header and the next version header (or EOF) | |
| awk "/^## \[${version}\]/{found=1; next} /^## \[/{if(found) exit} found{print}" CHANGELOG.md > release-notes.md | |
| echo "body<<CHANGELOG_EOF" >> "$GITHUB_OUTPUT" | |
| cat release-notes.md >> "$GITHUB_OUTPUT" | |
| echo "CHANGELOG_EOF" >> "$GITHUB_OUTPUT" | |
| outputs: | |
| changelog: ${{ steps.changelog.outputs.body }} | |
| build: | |
| needs: validate-changelog | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| platform: mac | |
| - os: ubuntu-latest | |
| platform: linux | |
| - os: windows-latest | |
| platform: win | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build app | |
| run: npm run build | |
| env: | |
| VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }} | |
| VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }} | |
| - name: Package with electron-builder | |
| run: npx electron-builder --publish never | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.platform }} | |
| path: | | |
| out/*.dmg | |
| out/*.zip | |
| out/*.AppImage | |
| out/*.deb | |
| out/*.exe | |
| out/*.msi | |
| out/*.yml | |
| out/*.yaml | |
| if-no-files-found: ignore | |
| release: | |
| needs: [validate-changelog, build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: ${{ needs.validate-changelog.outputs.changelog }} | |
| files: artifacts/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |