Skip to content

Commit

Permalink
chore: Use PyPI trusted publisher (#1635)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Apr 24, 2023
1 parent 108c29c commit 962c058
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ on:
release:
types: [published]

permissions:
contents: write # Needed to upload artifacts to the release
id-token: write # Needed for OIDC PyPI publishing

jobs:
release:
name: Publish to PyPI
runs-on: ubuntu-latest
environment: publishing

steps:
- name: Checkout code
Expand All @@ -19,13 +24,17 @@ jobs:
python-version: "3.10"

- name: Upgrade pip
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install pip
pip --version
- name: Install Poetry
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
pipx install poetry
poetry --version
- name: Check version
Expand All @@ -48,6 +57,3 @@ jobs:

- name: Publish
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_SECRET_TOKEN }}

0 comments on commit 962c058

Please sign in to comment.