Build on Tag #8
Workflow file for this run
This file contains 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: Build and Package NiimPrintX App | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Extract Tag | |
id: get_tag_name | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
cache: 'poetry' | |
# - name: Install Poetry | |
# run: | | |
# curl -sSL https://install.python-poetry.org | python3 - | |
# echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: poetry install | |
- name: Install ImageMagick & create-dmg | |
run: brew install imagemagick create-dmg | |
- name: Package application with PyInstaller | |
run: poetry run pyinstaller spec_files/ui_app/NiimPrintX-mac.spec --noconfirm --clean | |
- name: Create DMG package | |
run: ./.github/workflows/mac-dmg-builder.sh "${{ steps.get_tag_name.outputs.VERSION }}" | |
- name: Upload DMG package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NiimPrintX-Installer-${{ steps.get_tag_name.outputs.VERSION }} | |
path: dist/NiimPrintX-Installer-${{ steps.get_tag_name.outputs.VERSION }}-MacOSX.dmg | |
- name: Create GitHub Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: dist/NiimPrintX-Installer-${{ steps.get_tag_name.outputs.VERSION }}-MacOSX.dmg | |
generate_release_notes: true | |