Skip to content

Commit

Permalink
add release workflow to GitHub Actions (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Oct 13, 2024
1 parent 03d547b commit dbe14fc
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: release cli to the GitHub Release

on:
workflow_dispatch:
inputs:
method:
description: |
Which number to increment in the semantic versioning.
Set 'major', 'minor', or 'patch'.
required: true

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: check actor
if: github.actor != 'JunNishimura'
run: exit 1
- name: check branch
if: github.ref != 'refs/heads/main'
run: exit 1
- name: wait tests
id: test_result
uses: Sibz/[email protected]
with:
contexts: test-status
authToken: ${{ secrets.GITHUB_TOKEN }}
timeout: 30
- name: check test result
if: steps.test_result.outputs.result != 'success'
run: |
echo "failed ${{ steps.test_result.outputs.failedCheckNames }}"
echo "failed ${{ steps.test_result.outputs.failedCheckStates }}"
exit 1
- name: checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: bump-up semantic version
uses: kyoh86/[email protected]
with:
method: "${{ github.event.inputs.method }}"
- name: setup Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true
- name: run goreleaser
uses: goreleaser/goreleaser-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
with:
args: release --rm-dist

0 comments on commit dbe14fc

Please sign in to comment.