From 191cbc87b7233b810d6cbaa04990640dbbf440de Mon Sep 17 00:00:00 2001 From: pylipp Date: Wed, 3 Jan 2024 19:10:29 +0100 Subject: [PATCH] Use PyPI trusted publishing in GitHub action --- .github/workflows/release.yml | 12 ++++++------ Changelog.md | 4 ++++ pyproject.toml | 1 - 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ee3f84..d43ee36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,9 +7,11 @@ on: jobs: publish: - + name: upload release to PyPI runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v3 - name: Set up Python @@ -30,10 +32,8 @@ jobs: with: body_path: ${{ github.workspace }}-release_notes.md token: ${{ secrets.GITHUB_TOKEN }} - - name: Build package and publish to PyPI - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + - name: Build package run: | python -m build - twine upload dist/* + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/Changelog.md b/Changelog.md index 9166844..f753bfa 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Removed ### Deprecated +## [v1.3.4] - 2024-01-03 +### Changed +- Use PyPI trusted publishing when uploading package. + ## [v1.3.3] - 2024-01-03 ### Changed - Update dependencies `argcomplete` and `rich`. (#185, #187, #188, #191) diff --git a/pyproject.toml b/pyproject.toml index e837835..4ae14a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,6 @@ develop = [ ] packaging = [ "build", - "twine>=1.11", ] [project.urls]