Skip to content

Commit

Permalink
Use PyPI trusted publishing in GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
pylipp committed Jan 3, 2024
1 parent 5c17d69 commit 191cbc8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ develop = [
]
packaging = [
"build",
"twine>=1.11",
]

[project.urls]
Expand Down

0 comments on commit 191cbc8

Please sign in to comment.