Skip to content

Merge pull request #133 from masutaka/add-badge-go-report-card #13

Merge pull request #133 from masutaka/add-badge-go-report-card

Merge pull request #133 from masutaka/add-badge-go-report-card #13

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
tagpr:
# (1) Create a release pull request.
# e.g. https://github.com/masutaka/github-nippou/pull/132
# (2) If the pull request exists, update it.
# (3) If the pull request is merged, create a new git tag.
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- id: run-tagpr
uses: Songmu/tagpr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
tagpr-tag: ${{ steps.run-tagpr.outputs.tag }}
release:
# When (3) above, the if condition is satisfied.
# The github-nippou binaries are built and uploaded to GitHub release.
if: needs.tagpr.outputs.tagpr-tag != ''
needs: tagpr
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Setup GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
- name: Release
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pushover:
name: pushover if failure
if: failure()
needs: [release]
uses: ./.github/workflows/pushover.yml