From 27800e6549c34fbe93c17046761ecf859a397c12 Mon Sep 17 00:00:00 2001 From: danjov Date: Mon, 25 Nov 2024 13:43:26 +0100 Subject: [PATCH 1/3] Use GitHub CLI for creating releases --- .github/workflows/pre-release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index a93b111..b53219e 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -8,6 +8,7 @@ on: env: REGISTRY: ghcr.io + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: create-pre-release: @@ -58,9 +59,12 @@ jobs: cache-to: type=inline - name: Create GitHub pre-release - uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: v${{ env.VERSION }} - prerelease: true - title: ${{ env.VERSION }} + run: | + gh api \ + --method POST \ + --header "Accept: application/vnd.github+json" \ + /repos/${GITHUB_REPOSITORY}/releases \ + -f tag_name='v${{ env.VERSION }}' \ + -f target_commitish='main' \ + -f name='${{ env.VERSION }}' \ + -F prerelease=true \ From 1b9945990da44c106e7a669ca68760bd1cac7f09 Mon Sep 17 00:00:00 2001 From: danjov Date: Mon, 25 Nov 2024 16:24:06 +0100 Subject: [PATCH 2/3] Use release command of GitHub CLI --- .github/workflows/pre-release.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index b53219e..54282ed 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -59,12 +59,5 @@ jobs: cache-to: type=inline - name: Create GitHub pre-release - run: | - gh api \ - --method POST \ - --header "Accept: application/vnd.github+json" \ - /repos/${GITHUB_REPOSITORY}/releases \ - -f tag_name='v${{ env.VERSION }}' \ - -f target_commitish='main' \ - -f name='${{ env.VERSION }}' \ - -F prerelease=true \ + run: gh release create ${{ env.VERSION }} --title "${{ env.VERSION }}" --prerelease --target ${{ github.ref }} + From deb8488ef6eca46b44aa42834f5004ddcf39f0a7 Mon Sep 17 00:00:00 2001 From: danjov Date: Mon, 25 Nov 2024 16:40:33 +0100 Subject: [PATCH 3/3] Add missing "v" prefix for version tag --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 54282ed..c403789 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -59,5 +59,5 @@ jobs: cache-to: type=inline - name: Create GitHub pre-release - run: gh release create ${{ env.VERSION }} --title "${{ env.VERSION }}" --prerelease --target ${{ github.ref }} + run: gh release create v${{ env.VERSION }} --title "${{ env.VERSION }}" --prerelease --target ${{ github.ref }}