Skip to content

Commit

Permalink
Switch PyPI releasing to the trusted publishing model (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Jun 18, 2023
1 parent 17308ad commit d256375
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,10 @@ jobs:
- macos-packaging
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
- name: Download Python artifacts
uses: actions/download-artifact@v3
Expand All @@ -471,8 +475,6 @@ jobs:
uses: pypa/gh-action-pypi-publish@v1.8.6
with:
skip-existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Add assets to current release
uses: softprops/action-gh-release@v1
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/build-hatchling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
tags:
- hatchling-v*

concurrency:
group: build-hatchling-${{ github.head_ref }}

jobs:
build:
name: Build wheels and source distribution
Expand All @@ -34,15 +31,16 @@ jobs:
- build
runs-on: ubuntu-latest

permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: artifacts
path: dist

- name: Push build artifacts to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.5
uses: pypa/gh-action-pypi-publish@v1.8.6
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN_HATCHLING }}
skip-existing: true

0 comments on commit d256375

Please sign in to comment.