Skip to content

Commit

Permalink
add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
swhite24 committed Apr 16, 2021
1 parent 8e0b30c commit b4c9e9b
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
pull_request:
types:
- labeled
- closed

jobs:
release-check:
runs-on: ubuntu-latest
if: github.event.action == 'labeled'
steps:
- uses: actions/checkout@v2
# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- uses: haya14busa/action-bumpr@v1
pre-release:
runs-on: ubuntu-latest
if: github.event.action == 'closed' && github.event.pull_request.merged
outputs:
skip: ${{ steps.bumpr.outputs.skip }}
steps:
- uses: actions/checkout@v2
- id: bumpr
uses: haya14busa/action-bumpr@v1
with:
github_token: ${{ secrets.GH_TOKEN }}
release:
runs-on: ubuntu-latest
if: github.event.action == 'closed' && github.event.pull_request.merged
needs: pre-release
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: "!needs.pre-release.outputs.skip"
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit b4c9e9b

Please sign in to comment.