Skip to content

Commit

Permalink
Use PyPI trusted publisher instead of API token
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed Jul 3, 2024
1 parent 5468469 commit b1cc89c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:
description: 'Version number for pre-releases; defaults to build number'
required: false
default: ''
env:
LATEST_PY_VERSION: '3.11'

jobs:
# Deploy stable builds on tags only, and pre-release builds from manual trigger ("workflow_dispatch")
Expand All @@ -24,10 +22,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.LATEST_PY_VERSION }}
python-version: 3.12
- uses: snok/install-poetry@v1.3
with:
version: 1.5.1 # For python 3.7 compatibility
virtualenvs-in-project: true

- name: Set pre-release version
Expand All @@ -39,7 +36,7 @@ jobs:
poetry version $(poetry version -s).${{ env.pre-release-suffix }}${{ env.pre-release-version }}
poetry version
- name: Build and publish to pypi
run: |
poetry build
poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}
- name: Build package distributions
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
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 = "requests-ratelimiter"
version = "0.7.0"
version = "0.7.1"
description = "Rate-limiting for the requests library"
authors = ["Jordan Cook"]
license = "MIT"
Expand Down

0 comments on commit b1cc89c

Please sign in to comment.