diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 84ab8ed..e97e703 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -14,6 +14,9 @@ on: - main workflow_dispatch: +permissions: + contents: write + jobs: test: name: ${{ matrix.platform }} py${{ matrix.python-version }} @@ -78,13 +81,11 @@ jobs: python -m build . twine upload dist/* - name: Create Release - id: create_release - uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: Release for Zenodo - draft: false - prerelease: false + tag: ${{ github.ref_name }} + run: | + gh release create "$tag" \ + --repo="$GITHUB_REPOSITORY" \ + --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ + --generate-notes