Skip to content

Commit

Permalink
ci: Use Trusted Publisher flow for uploading packages
Browse files Browse the repository at this point in the history
  • Loading branch information
take-kun committed Nov 10, 2024
1 parent edd78f8 commit 3dbe756
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/release-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ jobs:

runs-on: "ubuntu-latest"

permissions:
id-token: write

environment:
name: testpypi
url: https://test.pypi.org/project/mercapi/

steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -19,5 +26,4 @@ jobs:
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository_url: https://test.pypi.org/legacy/
9 changes: 7 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jobs:

runs-on: "ubuntu-latest"

permissions:
id-token: write

environment:
name: pypi
url: https://pypi.org/project/mercapi/

steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -21,8 +28,6 @@ jobs:

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Tag a commit
run: |
Expand Down

0 comments on commit 3dbe756

Please sign in to comment.