Skip to content

Commit

Permalink
Merge pull request #205 from neutrinoceros/trusted_publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros authored Jul 12, 2023
2 parents 73536b9 + 6d0feb2 commit fcdca57
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ name: CD
on:
push:
tags: v*

jobs:
publish:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/wxc
permissions:
id-token: write
steps:
- name: Checkout Source
uses: actions/checkout@v3
Expand All @@ -17,8 +24,6 @@ jobs:
- name: Build distributions
shell: bash -l {0}
run: python -m build
- name: Publish package to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_token }}
- name: Publish package distributions to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit fcdca57

Please sign in to comment.