This repository was archived by the owner on Apr 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (50 loc) · 1.52 KB
/
release.yml
File metadata and controls
50 lines (50 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Release 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 != 'kyoh86'
run: exit 1
- name: Check Branch
if: github.ref != 'refs/heads/main'
run: exit 1
- name: Wait Tests
id: test_result
uses: Sibz/await-status-action@v1.0.2
with:
contexts: test-status
authToken: ${{ secrets.GITHUB_TOKEN }}
timeout: 30
- name: Check Test Result
if: steps.test_result.outputs.result != 'success'
run: |
echo "feiled ${{ steps.test_result.outputs.failedCheckNames }}"
echo "status ${{ steps.test_result.outputs.failedCheckStates }}"
exit 1
- name: Checkout Sources
uses: actions/checkout@v6
- name: Bump-up Semantic Version
uses: kyoh86/git-vertag-action@v1
with:
# method: "major", "minor" or "patch" to update tag with semver
method: "${{ github.event.inputs.method }}"
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
with:
args: release --rm-dist