From 4028baf98812bf811713b9f0755a3991d4d194ff Mon Sep 17 00:00:00 2001 From: Priya Gupta <147705955+priyagupta108@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:45:45 +0530 Subject: [PATCH] Replace deprecated release action with GitHub CLI (#80) --- .github/workflows/build-tool-packages.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-tool-packages.yml b/.github/workflows/build-tool-packages.yml index 0266195..8bc64ef 100644 --- a/.github/workflows/build-tool-packages.yml +++ b/.github/workflows/build-tool-packages.yml @@ -215,14 +215,18 @@ jobs: - name: Publish Release id: create_release - uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ inputs.tool-version }}-${{ github.run_id }} - release_name: ${{ inputs.tool-version }} - body: | - ${{ steps.generate-release-body.outputs.RELEASE_BODY }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + tag_name="${{ inputs.tool-version }}-${{ github.run_id }}" + gh release create "$tag_name" \ + --repo="$GITHUB_REPOSITORY" \ + --title="${{ inputs.tool-version }}" \ + --notes="${{ steps.generate-release-body.outputs.RELEASE_BODY }}" + + release_id=$(gh release view "$tag_name" --repo "$GITHUB_REPOSITORY" --json databaseId --jq '.databaseId') + echo "id=$release_id" >> $GITHUB_OUTPUT - name: Generate hash for packages run: |