Skip to content

Commit

Permalink
setup trusted publishing rather than PYPI_API_TOKEN secret
Browse files Browse the repository at this point in the history
- chore(release.yml): configure permissions id-token write
- chore(release.yml): configure environment for pypi
- chore(release.yml): if condition to only run tagged version
  • Loading branch information
msftcangoblowm committed Feb 29, 2024
1 parent e787ee3 commit 2f11456
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
DEST_FOLDER: dist/

permissions:
contents: read # This is required for actions/checkout

jobs:
build:
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
Expand Down Expand Up @@ -55,7 +59,11 @@ jobs:
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
environment:
name: pypi
url: https://pypi.org/p/logging-strict
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

- name: Release GitHub
uses: softprops/action-gh-release@v1
Expand Down
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ Changelog

.. scriv-start-here
.. _changes_1-2-13:

Version 1.2.13 — 2024-02-29
---------------------------

- chore(release.yml): configure permissions id-token write
- chore(release.yml): configure environment for pypi
- chore(release.yml): if condition to only run tagged version

.. _changes_1-2-12:

Version 1.2.12 — 2024-02-29
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
# @@@ editable
copyright = "2023–2024, Dave Faulkmore"
# The short X.Y.Z version.
version = "1.2.12"
version = "1.2.13"
# The full version, including alpha/beta/rc tags.
release = "1.2.12"
release = "1.2.13"
# The date of release, in "monthname day, year" format.
release_date = "February 29, 2024"
# @@@ end
Expand Down

0 comments on commit 2f11456

Please sign in to comment.