diff --git a/.github /workflows/release.yml b/.github/workflows/release.yaml similarity index 70% rename from .github /workflows/release.yml rename to .github/workflows/release.yaml index f71e773..eee7d12 100644 --- a/.github /workflows/release.yml +++ b/.github/workflows/release.yaml @@ -3,16 +3,17 @@ name: Release on: push: tags: - - '*' + - "*" jobs: pypi-publish: runs-on: ubuntu-latest - if: github.repository == 'julianwachholz/django-autocompletefilter' + if: startsWith(github.ref, 'refs/tags/') && github.repository == 'julianwachholz/django-autocompletefilter' environment: name: pypi url: https://pypi.org/p/django-autocompletefilter permissions: + contents: write id-token: write steps: - uses: actions/checkout@v4 @@ -33,5 +34,10 @@ jobs: twine check dist/* - name: Upload packages - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@v1.10.2 + + - name: Create release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: dist/*