Release #3
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: "Release" | |
on: | |
release: | |
types: | |
- "published" | |
env: | |
PYTHON_VERSION: "3.12" | |
jobs: | |
lint: | |
uses: ./.github/workflows/lint.yml | |
format: | |
uses: ./.github/workflows/format.yml | |
tests: | |
uses: ./.github/workflows/tests.yml | |
build: | |
name: Build package release | |
needs: | |
- lint | |
- format | |
- tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout the repository" | |
uses: actions/checkout@v4 | |
- name: Set version number | |
run: | | |
sed -i 's/version = "0.0.0"/version = "${{ github.event.release.tag_name }}"/' \ | |
"${{ github.workspace }}/setup.py" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build package | |
run: | | |
python -m build | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact | |
path: dist/ | |
if-no-files-found: error | |
release: | |
name: Upload release to PyPI | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/aio-intex-spa | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifact | |
path: dist/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |