Skip to content

Commit

Permalink
💚 Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sjquant committed Mar 11, 2024
1 parent cccfcbe commit 2fdcc58
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/sitemapr
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -32,7 +37,7 @@ jobs:
VERSION="v$(poetry version -s)"
echo "Current version: $VERSION"
LATEST_RELEASE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
LATEST_RELEASE=$(curl -s -H "Authorization: token ${{ github.token }}" \
https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name')
echo "Latest release version: $LATEST_RELEASE"
Expand All @@ -47,13 +52,11 @@ jobs:
- name: Create Release
if: steps.version_check.outputs.version_changed == 'true'
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version_check.outputs.new_version }}
generate_release_notes: True

- name: Build and publish to PyPI
- name: Upload release to PyPI
if: steps.version_check.outputs.version_changed == 'true'
run: |
poetry build
poetry publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 2fdcc58

Please sign in to comment.