name: tagpr
on:
  push:
    branches:
    - "master"
jobs:
  tagpr:
    runs-on: ubuntu-latest
    steps:
    - name: checkout
      uses: actions/checkout@v3
    - name: setup go
      uses: actions/setup-go@v3
      with:
        go-version-file: go.mod
    - name: tagpr
      id: tagpr
      uses: Songmu/tagpr@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    - uses: ./.github/actions/release
      with:
        tag: ${{ steps.tagpr.outputs.tag }}
        token: ${{ secrets.GITHUB_TOKEN }}
      if: "steps.tagpr.outputs.tag != ''"
