-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (51 loc) · 1.24 KB
/
release.yml
File metadata and controls
63 lines (51 loc) · 1.24 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Run tests
run: CGO_ENABLED=0 go test ./...
- name: Get version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Build all platforms
run: ./hack/build-all.sh ${{ steps.version.outputs.VERSION }}
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/ctx-*
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Test
run: CGO_ENABLED=0 go test -v ./...
- name: Vet
run: CGO_ENABLED=0 go vet ./...