From d8dc87b79eb92128be5924bf7d9869ee965a641f Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Sun, 1 Oct 2023 13:24:54 +0300 Subject: [PATCH] CI: add publish step for version tags --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd63328de..2c0eaafdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,8 @@ on: branches: - master - '*-maint' + tags: + - 'v*' pull_request: branches: - master @@ -76,3 +78,23 @@ jobs: with: name: dist path: dist + publish: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + needs: + - build + runs-on: ubuntu-latest + environment: + name: release + url: https://pypi.org/p/babel/ + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v3 + with: + name: dist + path: dist/ + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true + print-hash: true