release #26
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: Release | |
on: | |
push: | |
tags: | |
- '**' # this is guarded by samuelcolvin/check-python-version, which checks that the tag matches the version | |
workflow_dispatch: | |
inputs: | |
publish_package: | |
description: 'Publish build on PyPI' | |
required: true | |
default: false | |
type: boolean | |
skip_env_check: | |
description: 'Skip tag check' | |
required: true | |
default: false | |
type: boolean | |
jobs: | |
check-frontend: | |
uses: ./.github/workflows/check-frontend.yml | |
check-python: | |
uses: ./.github/workflows/check-python.yml | |
pytest: | |
uses: ./.github/workflows/pytest.yml | |
build: | |
runs-on: ubuntu-22.04 | |
needs: [check-frontend, check-python, pytest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-python | |
- uses: ./.github/actions/install-python-build | |
- uses: samuelcolvin/check-python-version@v4 | |
id: check-python-version | |
with: | |
skip_env_check: ${{ github.event.inputs.skip_env_check }} | |
version_file_path: invokeai/version/invokeai_version.py | |
- uses: ./.github/actions/setup-frontend | |
- name: Run create_installer.sh | |
id: create_installer | |
run: ./create_installer.sh --skip_frontend_checks | |
working-directory: installer | |
- name: Upload installer artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.create_installer.outputs.INSTALLER_FILENAME }} | |
path: ${{ steps.create_installer.outputs.INSTALLER_PATH }} | |
- name: Upload python distribution artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: ${{ steps.create_installer.outputs.DIST_PATH }} | |
release: | |
runs-on: ubuntu-22.04 | |
needs: [build] | |
environment: release | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-python | |
- uses: ./.github/actions/install-python-build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist # this unzips the dist artifact | |
path: dist/ | |
- name: Check distribution | |
run: python -m twine check dist/* |