Merge branch 'release/24.10.10' #22
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: Publish | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
env: | |
PY_COLORS: 1 | |
PYTHON_VERSION: '3.12.6' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{env.PYTHON_VERSION}} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.3 | |
- name: Install poetry dependencies | |
run: poetry install --no-root --with=dev --with=test | |
- name: Add Dynamic Versioning Plugin | |
run: | | |
poetry self add poetry-dynamic-versioning[plugin] | |
- name: Update the version | |
run: | | |
poetry dynamic-versioning | |
echo "VERSION=$(poetry version --short)" | |
- name: Package project | |
run: make twine-check | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
# [1-build-publish-workflow] | |
test-pypi-publish: | |
name: Publish release candidate artifacts to test PyPI | |
if: contains(github.ref, 'rc') == true | |
runs-on: ubuntu-22.04 | |
needs: | |
- build | |
environment: | |
name: testpypi | |
url: https://test.pypi.org/p/python_secrets | |
permissions: | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish release candidate distribution to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true | |
pypi-publish: | |
name: Publish release artifacts to PyPI | |
if: contains(github.ref, 'rc') == false | |
runs-on: ubuntu-22.04 | |
needs: | |
- build | |
environment: | |
name: pypi | |
url: https://pypi.org/p/python_secrets | |
permissions: | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# ![1-build-publish-workflow] |