overclaims fixes #151
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: Desktop App Release | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| PYTHON_VERSION: "3.13" | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.meta.outputs.version }} | |
| tag: ${{ steps.meta.outputs.tag }} | |
| steps: | |
| - id: meta | |
| name: Compute version metadata | |
| shell: bash | |
| run: | | |
| SHORT_SHA="${GITHUB_SHA::7}" | |
| UTC_DATE="$(date -u +%Y.%m.%d)" | |
| VERSION="${UTC_DATE}-${SHORT_SHA}" | |
| TAG="desktop-${VERSION}" | |
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
| echo "tag=${TAG}" >> "$GITHUB_OUTPUT" | |
| build: | |
| name: Build ${{ matrix.target }} | |
| needs: prepare | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: macos-latest | |
| target: macos | |
| - runner: windows-latest | |
| target: windows | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Install Python dependencies | |
| shell: bash | |
| run: | | |
| uv sync --group dev | |
| - name: Build desktop bundle | |
| shell: bash | |
| env: | |
| APP_VERSION: ${{ needs.prepare.outputs.version }} | |
| run: | | |
| echo "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}" > google-credentials.json | |
| uv run python app/build_release.py --target ${{ matrix.target }} | |
| - name: Upload bundle artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TaskCollector-${{ matrix.target }}-${{ needs.prepare.outputs.version }} | |
| path: app/dist/TaskCollector-${{ matrix.target }}-${{ needs.prepare.outputs.version }}.zip | |
| release: | |
| name: Publish GitHub release | |
| needs: | |
| - prepare | |
| - build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: release-assets | |
| - name: Publish release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ needs.prepare.outputs.tag }} | |
| name: TaskCollector Desktop ${{ needs.prepare.outputs.version }} | |
| body: | | |
| Automated desktop builds for commit `${{ github.sha }}`. | |
| Version: ${{ needs.prepare.outputs.version }} | |
| ## Latest Commit | |
| **${{ github.event.head_commit.message }}** | |
| Author: ${{ github.event.head_commit.author.name }} | |
| artifacts: release-assets/**/TaskCollector-*.zip | |
| allowUpdates: false | |
| token: ${{ secrets.GITHUB_TOKEN }} |