Skip to content

Commit

Permalink
Merge pull request #39 from take-kun/ci/pypi-trusted-publisher
Browse files Browse the repository at this point in the history
Use Trusted Publisher flow for uploading packages
  • Loading branch information
take-kun authored Nov 10, 2024
2 parents edd78f8 + 2991b0b commit bbf5678
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mercapi"
version = "0.4.1"
version = "0.4.2"
description = "Python API for querying and browsing mercari.jp"
authors = ["take-kun <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit bbf5678

Please sign in to comment.