-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (68 loc) · 1.91 KB
/
release.yml
File metadata and controls
73 lines (68 loc) · 1.91 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Release
on:
push:
branches: [main, dev]
workflow_dispatch:
permissions:
contents: write
issues: write
pull-requests: write
jobs:
semantic-dry-run:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm install conventional-changelog-conventionalcommits
- name: Semantic Release (dry-run)
run: npx semantic-release --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
semantic-release:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm install conventional-changelog-conventionalcommits
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
goreleaser:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: semantic-release
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: ./.github/actions/setup-go
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v6.3.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}