From ddeba676b783006d3664ee0e2aa5c458e59c0bc2 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Fri, 23 Oct 2026 15:30:51 +0200 Subject: [PATCH] Add release workflow for PyPI deployment --- .github/workflows/release-pypi.yml | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release-pypi.yml diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml new file mode 100644 index 0000000..3b8abf9 --- /dev/null +++ b/.github/workflows/release-pypi.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: read + +jobs: + tests: + uses: ./.github/workflows/test_package.yml + + build: + needs: [tests] + uses: ./.github/workflows/build_release.yml + + # Trusted publishing: PyPI accepts this job only from this file and the `pypi` environment + publish: + needs: [build] + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/dlccore/ + permissions: + id-token: write + + concurrency: + group: pypi-deploy + cancel-in-progress: false + + steps: + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - uses: pypa/gh-action-pypi-publish@v1.14.2