Skip to content

Commit

Permalink
create release with gh cli
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhbrook committed Aug 30, 2024
1 parent f12a41f commit 9ffb736
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ jobs:
with:
name: man-page
path: _build/man
- name: Build Release Notes
# thanks to https://gist.github.com/Integralist/57accaf446cf3e7974cd01d57158532c
run: awk '/^##/ {block++} {if (block == 1) { print }}' CHANGELOG.md > RELEASE_NOTES.md
- name: Store Release Notes
uses: actions/upload-artifact@v3
with:
name: release-notes
path: RELEASE_NOTES.md

pypi-release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,19 +95,14 @@ jobs:
with:
name: man-page
path: man
- name: Create a GitHub release
uses: comnoco/create-release-action@v2
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
- name: Download release notes
uses: actions/download-artifact@v3
with:
draft: false
prerelease: false
tag_name: ${{ github.ref }}
release_name: Release v${{ needs.versions.outputs.release-version }}
- name: Upload files to GitHub release
name: release-notes
path: RELEASE_NOTES.md
- name: Create a GitHub release
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
run: |
cd '${{ github.workspace }}'
gh release upload '${{ github.ref }}' dist/* man/pyee.1
gh release create '${{ github.ref }}' --title 'Release v${{ needs.versions.outputs.release-version }}' --notes "$(cat RELEASE_NOTES.md)" dist/* man/pyee.1

0 comments on commit 9ffb736

Please sign in to comment.