Skip to content

Merge pull request #23 from budougumi0617/chore/use-tagpr #1

Merge pull request #23 from budougumi0617/chore/use-tagpr

Merge pull request #23 from budougumi0617/chore/use-tagpr #1

name: tag-and-release
on:
push:
branches:
- master
jobs:
tagpr:
runs-on: ubuntu-latest
outputs:
tagpr-tag: ${{ steps.run-tagpr.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- id: run-tagpr
name: Run tagpr
uses: Songmu/tagpr@v1
goreleaser:
needs: tagpr
if: needs.tagpr.outputs.tagpr-tag != ''
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: "latest"
args: release --clean
env:
# need to access other repository for brew-tap
GITHUB_TOKEN: ${{ secrets.GH_PAT }}