Skip to content

Commit

Permalink
Merge pull request #28 from ru-fu/pypi-publish
Browse files Browse the repository at this point in the history
update publishing to use a trusted publisher
  • Loading branch information
ru-fu authored Dec 8, 2023
2 parents 94c2a3f + f09fb39 commit ff46b7d
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish lxd-sphinx-extensions to PyPI
on: workflow_dispatch
jobs:
build-n-publish:
name: Build and publish
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -20,7 +20,24 @@ jobs:
--wheel
--outdir dist/
.
- name: Store the package
uses: actions/upload-artifact@v3
with:
name: python-package
path: dist/
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/lxd-sphinx-extensions
permissions:
id-token: write
steps:
- name: Download package
uses: actions/download-artifact@v3
with:
name: python-package
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit ff46b7d

Please sign in to comment.