Skip to content

Merge pull request #52 from k1LoW/dependabot/github_actions/dependenc… #13

Merge pull request #52 from k1LoW/dependabot/github_actions/dependenc…

Merge pull request #52 from k1LoW/dependabot/github_actions/dependenc… #13

Workflow file for this run

name: tagpr
on:
push:
branches:
- main
jobs:
tagpr:
runs-on: ubuntu-latest
outputs:
tagpr-tag: ${{ steps.run-tagpr.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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
assets:
needs: tagpr
if: needs.tagpr.outputs.tagpr-tag != ''
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
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:
distribution: goreleaser
version: latest
args: --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
needs: [tagpr, assets]
runs-on: ubuntu-latest
steps:
- name: Release
run: |
gh api /repos/${{ github.repository }}/releases/generate-notes -f tag_name=${{ needs.tagpr.outputs.tagpr-tag }} --jq .body | gh release edit ${{ needs.tagpr.outputs.tagpr-tag }} --repo ${{ github.repository }} --draft=false --latest --notes-file=-
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}