diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a4e893a8..2c8d3f72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,11 +67,25 @@ jobs: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - uses: actions/github-script@v7 + name: Update release label on PR with: script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, + const { data: { items } } = await github.rest.search.issuesAndPullRequests({ + q: `${context.sha} type:pr is:merged` + }); + + const issue = { + issue_number: items[0].number, owner: context.repo.owner, repo: context.repo.repo, - labels: ["autorelease: published"] - }) + }; + + github.rest.issues.addLabels({ + ...issue, + labels: ["autorelease: published"], + }); + + github.rest.issues.removeLabel({ + ...issue, + name: "autorelease: tagged", + }); diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 514cdb7b..300747d8 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,3 +1,5 @@ +version: 2 + builds: - id: jalapeno dir: cmd/jalapeno