diff --git a/.github/workflows/build-and-publish-to-pypi.yml b/.github/workflows/build-and-publish-to-pypi.yml index 2280541..5771c86 100644 --- a/.github/workflows/build-and-publish-to-pypi.yml +++ b/.github/workflows/build-and-publish-to-pypi.yml @@ -6,6 +6,8 @@ on: jobs: build-and-publish: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout code uses: actions/checkout@v3 @@ -25,4 +27,8 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_ACCESS_TOKEN }} run: | - python -m twine upload dist/* --skip-existing + python -m twine upload dist/* + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + run: gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --title "$GITHUB_REF_NAME" --generate-notes