Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: add a release workflow #308

Merged
merged 13 commits into from
Jun 8, 2023
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
release:
types:
- published

name: release

jobs:
pypi:
name: upload release to PyPI
runs-on: ubuntu-latest

permissions:
# Used to authenticate to PyPI via OIDC.
# Used to sign the release's artifacts with sigstore-python.
id-token: write

# Used to attach signing artifacts to the published release.
contents: write

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ">= 3.6"

- name: deps
run: python -m pip install -U setuptools build wheel
woodruffw marked this conversation as resolved.
Show resolved Hide resolved

- name: build
run: python -m build

- name: publish
uses: pypa/gh-action-pypi-publish@release/v1

- name: sign
uses: sigstore/[email protected]
with:
inputs: ./dist/*.tar.gz ./dist/*.whl
release-signing-artifacts: true