Skip to content

Commit

Permalink
Unify PyPI releases via GitHub OIDC
Browse files Browse the repository at this point in the history
  • Loading branch information
nfx authored Jul 11, 2024
1 parent 96913f5 commit 5a22fa1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/onrelease.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ on:

jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
python-version: [ 3.9 ]
os: [ ubuntu-latest ]
runs-on: ubuntu-latest
environment: release
permissions:
# Used to authenticate to PyPI via OIDC and 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@v1

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9

- uses: actions/cache@v2
id: cache
Expand All @@ -44,6 +45,4 @@ jobs:
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.LABS_PYPI_TOKEN }}
packages_dir: python/dist/

0 comments on commit 5a22fa1

Please sign in to comment.