From 655a0ace279452ee852b859db358b63ba2909df9 Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Fri, 9 Aug 2024 19:17:18 +0200 Subject: [PATCH] Handle GitHub releases using `gh` CLI (#531) --- .github/workflows/release-management.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-management.yml b/.github/workflows/release-management.yml index 0df48de7..d8ba8c2f 100644 --- a/.github/workflows/release-management.yml +++ b/.github/workflows/release-management.yml @@ -2,13 +2,15 @@ name: Release Management on: push: - branches: [ master ] + # branches: [ master ] + branches: [ release/* ] jobs: test_and_build: name: Test and build runs-on: ubuntu-20.04 outputs: + tag: ${{ steps.check_package_version.outputs.version }} version_changed: ${{ steps.check_package_version.outputs.changed }} steps: - name: Clone repository @@ -71,11 +73,10 @@ jobs: # `test_and_build` job first so this job is skipped rather than exited with an error. - name: Publish matching GitHub release draft id: github_release - uses: JamesMGreene/node-draft-releaser@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - allow_release_name_update: 'false' + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + run: gh release edit "${{ needs.test_and_build.outputs.tag }}" --draft=false - name: Write out the release URL run: echo "Released at $RELEASE_URL"