2024-03-02 12:48:23 +00:00
|
|
|
# Main release workflow. Triggered on tag push or manual trigger.
|
|
|
|
#
|
|
|
|
# - Runs all code checks and tests
|
|
|
|
# - Verifies the app version matches the tag version.
|
|
|
|
# - Builds the installer and build, uploading them as artifacts.
|
|
|
|
# - Publishes to TestPyPI and PyPI. Both are conditional on the previous steps passing and require a manual approval.
|
|
|
|
#
|
|
|
|
# See docs/RELEASE.md for more information on the release process.
|
|
|
|
|
2024-03-02 11:53:35 +00:00
|
|
|
name: release
|
2023-12-23 14:16:05 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2024-01-01 00:18:40 +00:00
|
|
|
- 'v*'
|
2023-12-23 14:16:05 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2024-03-02 10:37:49 +00:00
|
|
|
check-version:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: check python version
|
|
|
|
uses: samuelcolvin/check-python-version@v4
|
|
|
|
id: check-python-version
|
|
|
|
with:
|
|
|
|
version_file_path: invokeai/version/invokeai_version.py
|
2023-12-23 14:16:05 +00:00
|
|
|
|
2024-03-02 11:45:28 +00:00
|
|
|
frontend-checks:
|
|
|
|
uses: ./.github/workflows/frontend-checks.yml
|
2023-12-23 14:16:05 +00:00
|
|
|
|
2024-03-02 11:45:28 +00:00
|
|
|
frontend-tests:
|
|
|
|
uses: ./.github/workflows/frontend-tests.yml
|
2023-12-23 14:16:05 +00:00
|
|
|
|
2024-03-02 11:45:28 +00:00
|
|
|
python-checks:
|
|
|
|
uses: ./.github/workflows/python-checks.yml
|
2023-12-23 14:16:05 +00:00
|
|
|
|
2024-03-02 11:45:28 +00:00
|
|
|
python-tests:
|
|
|
|
uses: ./.github/workflows/python-tests.yml
|
2023-12-23 14:16:05 +00:00
|
|
|
|
2024-03-02 11:45:28 +00:00
|
|
|
build:
|
2024-03-02 11:53:35 +00:00
|
|
|
uses: ./.github/workflows/build-installer.yml
|
2023-12-23 14:16:05 +00:00
|
|
|
|
|
|
|
publish-testpypi:
|
|
|
|
runs-on: ubuntu-latest
|
2024-03-02 11:45:28 +00:00
|
|
|
timeout-minutes: 5 # expected run time: <1 min
|
2024-03-02 10:37:49 +00:00
|
|
|
needs:
|
|
|
|
[
|
|
|
|
check-version,
|
|
|
|
frontend-checks,
|
|
|
|
frontend-tests,
|
|
|
|
python-checks,
|
|
|
|
python-tests,
|
|
|
|
build,
|
|
|
|
]
|
2023-12-23 14:16:05 +00:00
|
|
|
environment:
|
|
|
|
name: testpypi
|
|
|
|
url: https://test.pypi.org/p/invokeai
|
|
|
|
steps:
|
2024-03-02 10:37:49 +00:00
|
|
|
- name: download distribution from build job
|
2023-12-23 14:16:05 +00:00
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
name: dist
|
|
|
|
path: dist/
|
|
|
|
|
2024-03-02 10:37:49 +00:00
|
|
|
- name: publish distribution to TestPyPI
|
2023-12-23 14:16:05 +00:00
|
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
|
|
with:
|
|
|
|
repository-url: https://test.pypi.org/legacy/
|
|
|
|
|
|
|
|
publish-pypi:
|
|
|
|
runs-on: ubuntu-latest
|
2024-03-02 11:45:28 +00:00
|
|
|
timeout-minutes: 5 # expected run time: <1 min
|
2024-03-02 10:37:49 +00:00
|
|
|
needs:
|
|
|
|
[
|
|
|
|
check-version,
|
|
|
|
frontend-checks,
|
|
|
|
frontend-tests,
|
|
|
|
python-checks,
|
|
|
|
python-tests,
|
|
|
|
build,
|
|
|
|
]
|
2023-12-23 14:16:05 +00:00
|
|
|
environment:
|
|
|
|
name: pypi
|
|
|
|
url: https://pypi.org/p/invokeai
|
|
|
|
steps:
|
2024-03-02 10:37:49 +00:00
|
|
|
- name: download distribution from build job
|
2023-12-23 14:16:05 +00:00
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
name: dist
|
|
|
|
path: dist/
|
|
|
|
|
2024-03-02 10:37:49 +00:00
|
|
|
- name: publish distribution to PyPI
|
2023-12-23 14:16:05 +00:00
|
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|