Skip to content

Bump goreleaser/goreleaser-action from 5 to 6 #1116

Bump goreleaser/goreleaser-action from 5 to 6

Bump goreleaser/goreleaser-action from 5 to 6 #1116

Workflow file for this run

name: Size
on:
pull_request:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
pull_request_target:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
jobs:
add_size_labels:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v4
- uses: actions-ecosystem/action-size@v2
id: size
- name: remove old size labels
if: ${{ steps.size.outputs.stale_labels != '' }}
continue-on-error: true ## don't fail CI checks even if labelling fails for some reasons
uses: actions/github-script@v7
with:
script: |
const stale_labels = `${{ steps.size.outputs.stale_labels }}`;
const remove_labels = stale_labels.split('\n');
for (const label of remove_labels) {
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: label,
})
}
## ref: https://github.com/actions/github-script#apply-a-label-to-an-issue
- name: apply new size label
if: ${{ steps.size.outputs.new_label != '' }}
continue-on-error: true ## don't fail CI checks even if labelling fails for some reasons
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['${{ steps.size.outputs.new_label }}'],
})