From c4b9bb0714ef59b8889ed287affb16443c80cce0 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 2 Jan 2025 17:51:28 +0000 Subject: [PATCH] fix(ci): directly call API to create release --- .gitea/workflows/release.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 2bcbf2f..7cff97f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -133,15 +133,23 @@ jobs: skip-tag: true - name: Create release - id: create_release - uses: akkuman/gitea-release-action@v1 - env: - NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18 - with: - tag: ${{ steps.get_next_version.outputs.tag }} - name: ${{ steps.get_next_version.outputs.tag }} - # body_path: .changelog - body: ${{ steps.get_next_version.outputs.changelog }} + run: | + curl -X POST -H "Authorization: token ${{ vars.PACKAGES_REGISTRY_PASSWORD }}" \ + -H "accept: application/json" \ + -H "Content-Type: application/json" \ + -d "{\"tag_name\": \"${{ steps.get_next_version.outputs.tag }}\", \"name\": \"${{ steps.get_next_version.outputs.tag }}\", \"body\": \"${{ steps.get_next_version.outputs.changelog }}\"}" \ + "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases" + + # - name: Create release + # id: create_release + # uses: akkuman/gitea-release-action@v1 + # env: + # NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18 + # with: + # tag: ${{ steps.get_next_version.outputs.tag }} + # name: ${{ steps.get_next_version.outputs.tag }} + # # body_path: .changelog + # body: ${{ steps.get_next_version.outputs.changelog }} - name: Set success/fail flag id: set_flag