ci: update actions/checkout action to v4 (#419) #443
This file contains 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
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: read | |
name: release | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # needed for release-please | |
issues: write # needed for github-release-commenter | |
pull-requests: write # needed for release-please and github-release-commenter | |
steps: | |
- uses: GoogleCloudPlatform/release-please-action@8016a6649226f2ec88ed05441c11bb5410a22d29 # v3.7.10 | |
id: release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release-type: simple | |
package-name: multi-gitter | |
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"dep","section":"Dependencies","hidden":false}]' | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version-file: "go.mod" | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@b953231f81b8dfd023c58e0854a721e35037f28b # v2.9.1 | |
with: | |
version: latest | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GENERAL_GITHUB_SECRET }} # The tokens needs access to another repo, so the secret.GITHUB_SECRET won't suffice | |
FURY_TOKEN: ${{ secrets.FURY_TOKEN }} # Gemfury token | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Comment on prs and issues | |
uses: apexskier/github-release-commenter@2c48bf8b39f414bc2f0c226e1f997e6207bb1942 # v1.3.2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
comment-template: Included in release {release_link} 🎉 | |
skip-label: "autorelease: tagged,autorelease: pending" | |
if: ${{ steps.release.outputs.release_created }} |