Skip to content

Commit

Permalink
refactor: use PyPI trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
tconbeer committed Apr 16, 2024
1 parent a281b63 commit 29399c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
publish-package:
if: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v') }}
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write

steps:
- name: Check out harlequin main branch
Expand All @@ -25,15 +28,13 @@ jobs:
uses: snok/install-poetry@v1
with:
version: 1.7.1
- name: Configure poetry
run: poetry config --no-interaction pypi-token.pypi ${{ secrets.HARLEQUIN_PYPI_TOKEN }}
- name: Get harlequin Version
id: harlequin_version
run: echo "harlequin_version=$(poetry version --short)" >> $GITHUB_OUTPUT
- name: Build package
run: poetry build --no-interaction
- name: Publish package to PyPI
run: poetry publish --no-interaction
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create a Github Release
uses: softprops/action-gh-release@v2
with:
Expand Down

0 comments on commit 29399c8

Please sign in to comment.