Merge pull request #84 from babarot/tagpr-from-v1.5.1 #115
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }} | |
jobs: | |
tagpr: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run tagpr | |
uses: Songmu/tagpr@3dca11e7c0d68637ee212ddd35acc3d30a7403a4 # v1.5.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
id: run-tagpr | |
- name: Check for changelog | |
if: steps.run-tagpr.outputs.pull_request != '' | |
uses: babarot/changelog-empty-check-action@d76c23d5d734c5e72877d184a15d272bc39cef4b # v0.0.19 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
label-name: changelog/missing | |
pull-request-number: ${{ fromJSON(steps.run-tagpr.outputs.pull_request).number }} | |
warning-message: | | |
## 🚨 Not Mergeable: Changelog Update Required | |
This is a release PR, waiting to be merged when a new release is ready. | |
However, there are currently no changes that would be reflected in the Changelog—meaning there are no updates significant enough to justify a new release. | |
As a result, this PR is in a waiting state. Once a meaningful update is made and the Changelog is updated accordingly, this PR can be merged. | |
success-message: | | |
## ✅ Mergeable: Changelog Updated | |
New changes have been added and reflected in the Changelog, making this release PR ready to be merged. | |
Please perform a final check, and if everything looks good, proceed with the merge. | |
outputs: | |
tag: ${{ steps.run-tagpr.outputs.tag }} | |
goreleaser: | |
if: needs.tagpr.outputs.tag != '' | |
needs: tagpr | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # https://github.com/actions/checkout/issues/1471 | |
fetch-tags: true | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: '~> v2' | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} | |
SCOOP_GITHUB_TOKEN: ${{ secrets.SCOOP_GITHUB_TOKEN }} |