Skip to content

Commit

Permalink
chore(ci): update PR tag after publish
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Jul 11, 2024
1 parent 70d936e commit af71752
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
});
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

builds:
- id: jalapeno
dir: cmd/jalapeno
Expand Down

0 comments on commit af71752

Please sign in to comment.