Skip to content

Commit

Permalink
Adjust how the release is created in publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo385 committed Dec 24, 2024
1 parent 8b40b99 commit d2fa2e1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ jobs:
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

create-tag:
create-tag-and-release:
name: Create tag
needs: pypi-publish
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
- name: create-tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
Expand All @@ -47,11 +48,11 @@ jobs:
ref: 'refs/tags/v${{ needs.pypi-publish.outputs.new-version }}',
sha: context.sha
})
github.rest.git.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: 'v${{ needs.pypi-publish.outputs.new-version }}',
})
- name: Create release
run: |
gh release create "v${{ neds.pypi-publish.outputs.new-version }}" \
--title="LazyGithub ${tag#v}" \
--generate-notes
notify-discord:
name: Notify when this workflow completes (regardless of success or failure)
Expand Down

0 comments on commit d2fa2e1

Please sign in to comment.