Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: release

on: push
on:
push:
branches:
- main

permissions:
contents: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,3 @@ jobs:
github_token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
git_committer_name: "github-actions"
git_committer_email: "[email protected]"

outputs:
released: {% raw %}${{ steps.release.outputs.released || 'false' }}{% endraw %}
tag: {% raw %}${{ steps.release.outputs.tag }}{% endraw %}


publish:
runs-on: ubuntu-latest
needs: release
if: {% raw %}${{ needs.release.outputs.released == 'true' }}{% endraw %}

environment:
name: pypi
url: https://pypi.org/p/{{ project_name }}

permissions:
contents: write
{# IMPORTANT: this permission is mandatory for Trusted Publishing #}
id-token: write

steps:
- name: Check out at new tag
uses: actions/checkout@v4
with:
ref: {% raw %}${{ needs.release.outputs.tag }}{% endraw %}

- name: Set up the environment
uses: ./.github/actions/setup-python-env

- name: Build Package
run: make build

- name: Publish package distributions to PyPI
uses: pypa/[email protected]
with:
packages-dir: dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: publish

on:
release:
types: [published]

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: write
{# IMPORTANT: this permission is mandatory for Trusted Publishing #}
id-token: write

environment:
name: pypi
url: https://pypi.org/p/{{ project_name }}

steps:
- name: Check out at new tag
uses: actions/checkout@v4
with:
ref: {% raw %}${{ github.event.release.tag_name }}{% endraw %}

- name: Set up the environment
uses: ./.github/actions/setup-python-env

- name: Build Package
run: make build

- name: Publish package distributions to PyPI
uses: pypa/[email protected]
with:
packages-dir: dist