Release #50
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: | |
| workflow_dispatch: | |
| inputs: | |
| version_type: | |
| description: 'Type of version bump (major, minor, patch)' | |
| required: true | |
| default: 'patch' | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| concurrency: release | |
| permissions: | |
| id-token: write | |
| contents: write | |
| outputs: | |
| released: ${{ steps.release.outputs.released }} | |
| tag: ${{ steps.release.outputs.tag }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Python Semantic Release | |
| id: release | |
| uses: python-semantic-release/python-semantic-release@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| if: steps.release.outputs.released == 'true' | |
| with: | |
| password: ${{ secrets.PYPI_TOKEN }} | |
| - name: Publish to GitHub Release Assets | |
| uses: python-semantic-release/publish-action@v9.8.9 | |
| if: steps.release.outputs.released == 'true' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ steps.release.outputs.tag }} | |
| build-macos: | |
| needs: release | |
| if: needs.release.outputs.released == 'true' | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ needs.release.outputs.tag }} | |
| - name: Set up Python "3.12" | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Install librsvg | |
| run: brew install librsvg | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Create virtual env | |
| run: | | |
| uv venv | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| - name: Build macOS installer | |
| run: | | |
| make installer-mac | |
| xattr -dr com.apple.quarantine "installer/build/Basic Memory Installer.app" | |
| - name: Zip macOS installer | |
| run: | | |
| cd installer/build | |
| zip -ry "Basic-Memory-Installer-${{ needs.release.outputs.tag }}.zip" "Basic Memory Installer.app" | |
| - name: Upload macOS installer | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: installer/build/Basic-Memory-Installer-${{ needs.release.outputs.tag }}.zip | |
| tag_name: ${{ needs.release.outputs.tag }} | |
| token: ${{ secrets.GITHUB_TOKEN }} |