-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (41 loc) · 1.23 KB
/
release.yml
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
name: release
on:
push:
tags:
- '*'
permissions:
contents: write
env:
GOPRIVATE: github.com/ninech/apis
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- run: git config --global url.https://[email protected]/.insteadOf https://github.com/
- name: Define goreleaser flags
run: test -n "$(git tag --points-at HEAD)" || echo "GORELEASER_FLAGS=--snapshot" >> $GITHUB_ENV
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean ${{ env.GORELEASER_FLAGS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: nctl
path: dist/*