From 853a91c37a9bf60b9b36a990aa7c844d867c89cd Mon Sep 17 00:00:00 2001 From: DSR! Date: Tue, 20 May 2025 13:50:52 -0300 Subject: [PATCH] Fixes in sign code --- .github/workflows/sign.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sign.yml b/.github/workflows/sign.yml index 67b1e71..fe926bd 100644 --- a/.github/workflows/sign.yml +++ b/.github/workflows/sign.yml @@ -28,11 +28,19 @@ jobs: uses: actions/github-script@v7 with: script: | + // grab tag from user input const inputTag = '${{ github.event.inputs.tag }}'; - if (inputTag) return inputTag; + if (inputTag) { + // duh + return inputTag; + } + + // grab tag from release if (context.eventName === 'workflow_run') { return context.payload.workflow_run.event.release.tag_name; } + + // grab tag from last release const latest = await github.rest.repos.getLatestRelease({ owner: context.repo.owner, repo: context.repo.repo @@ -70,6 +78,7 @@ jobs: for exe in artifacts/*.exe; do ./cosign sign-blob --yes \ --identity-token "${{ steps.oidc.outputs.result }}" \ + --bundle "${exe}.bundle" \ "$exe" done @@ -77,8 +86,8 @@ jobs: run: | for exe in artifacts/*.exe; do ./cosign verify-blob \ - --certificate-identity "https://github.com/${{ github.repository }}" \ - "$exe" --signature "$exe.sig" + --bundle "${exe}.bundle" \ + "$exe" done - name: Upload signed installers to Release @@ -87,6 +96,7 @@ jobs: tag_name: ${{ steps.tag.outputs.result }} files: | artifacts/*.exe.sig + artifacts/*.bundle env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}