From c19c7b3e97ec940ac3e3248ae76ed65dd8fe9d78 Mon Sep 17 00:00:00 2001 From: Josh Holbrook Date: Fri, 30 Aug 2024 11:10:34 -0800 Subject: [PATCH] create release with gh cli --- .github/workflows/release.yaml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d804a14..55fdbb8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,6 +52,14 @@ jobs: with: name: man-page path: _build/man + - name: Build Release Notes + run: sphinx-build -M man docs _build + 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 @@ -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