-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (39 loc) · 1.1 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
46
47
48
49
name: release
on:
push:
tags:
- 'v*'
permissions:
contents: write # Release
id-token: write # Sign
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Manage Go dependencies
run: go mod tidy && git diff --exit-code && go mod download && go mod verify
- name: Build and test
run: make check
- name: Build docs
run: make docs
- name: Install Cosign
uses: sigstore/[email protected]
- name: Determine API version
id: plugin_describe
run: echo "api_version=$(go run . describe | jq -r '.api_version')" >> $GITHUB_OUTPUT
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}