From f580086cae7d7e141580457c16901121b37773c6 Mon Sep 17 00:00:00 2001 From: DSR! Date: Tue, 20 May 2025 14:33:47 -0300 Subject: [PATCH] Fixes in sign code --- .github/workflows/sign.yml | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/sign.yml b/.github/workflows/sign.yml index decf962..0e2d872 100644 --- a/.github/workflows/sign.yml +++ b/.github/workflows/sign.yml @@ -12,7 +12,7 @@ on: types: [completed] permissions: - contents: read + contents: write id-token: write jobs: @@ -27,6 +27,7 @@ jobs: id: tag uses: actions/github-script@v7 with: + result-encoding: string script: | // grab tag from user input const inputTag = '${{ github.event.inputs.tag }}'; @@ -92,27 +93,11 @@ jobs: "$exe" done - - name: Get release upload URL - id: get_release - uses: actions/github-script@v7 + - name: Publish signatures + uses: softprops/action-gh-release@v2 with: - result-encoding: string - script: | - const release = await github.rest.repos.getReleaseByTag({ - owner: context.repo.owner, - repo: context.repo.repo, - tag: '${{ steps.tag.outputs.result }}' - }); - return release.data.upload_url.replace('{?name,label}',''); - - - name: Upload signed assets - run: | - for sig in artifacts/*.exe.sig; do - exe_basename=$(basename "$sig" .sig) - gh api --method POST "$UPLOAD_URL" \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: application/octet-stream" \ - --data-binary "@${sig}" \ - -F name="${exe_basename}.exe.sig" - done + tag_name: ${{ steps.tag.outputs.result }} + files: artifacts/*.exe.sig + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}