macOS Release Hotfix #8
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: macOS Release Hotfix | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Existing release tag (e.g. v1.0.0)" | |
| required: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pyinstaller | |
| pip install -e . | |
| - name: Verify tag matches app version | |
| shell: python | |
| run: | | |
| from codeshuffler.version import __version__ | |
| assert __version__ == "${{ inputs.tag }}".lstrip("v") | |
| - name: Build macOS | |
| run: pyinstaller packaging/macos.spec | |
| - name: Package macOS | |
| run: ditto -c -k --keepParent dist/CodeShuffler.app CodeShuffler-macos.zip | |
| - name: Upload to existing release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ inputs.tag }} | |
| files: CodeShuffler-macos.zip |