From 023f4ba9d606ba7d13a1b99dfe96b8e4ce749133 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Fri, 19 Apr 2024 15:32:16 -0400 Subject: [PATCH] feat: Add release workflow --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8f38376 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + + Release: + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/ipyniivue + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + # For generating GitHub Releases + Release notes + # ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - run: | + pip install uv + uv pip install --system build + python -m build + + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + - uses: actions/setup-node@v4 + with: + node-version: 18.x + - run: npx changelogithub@0.12 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}