-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 1.74 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: release
on:
push:
tags:
- 'v*'
env:
GO_VERSION: 1.23.x
ZIG_VERSION: 0.13.0
GOLINT_ARGS: -v --allow-parallel-runners --timeout=10m --disable errcheck
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout ⤵️
uses: actions/checkout@v4
- name: Setup Go 🛠️
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Zig 🛠️
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- name: Test pkg library 🧪
run: |
cd pkg
go test -race -mod=readonly ./...
- name: Test 🧪
run: |
cd runtimes/cloudformation
go test -race -mod=readonly ./...
- name: Lint 🪥
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
working-directory: ./runtimes/cloudformation/cmd/handler
args: ${{ env.GOLINT_ARGS }}
- name: Run GoReleaser 🏗️
id: goreleaser
uses: goreleaser/goreleaser-action@v6
with:
args: build --clean --snapshot --parallelism=1
workdir: ./runtimes/cloudformation
env:
BUILD_VERSION: ${{ github.ref_name }}
GORELEASER_CURRENT_TAG: "0.0.0"
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: handler-${{ github.ref_name }}
path: |
./runtimes/cloudformation/dist
- name: Create release 🌟
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
./runtimes/cloudformation/dist
name: ${{ github.ref_name }}