-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.71 KB
/
release.yml
File metadata and controls
59 lines (51 loc) · 1.71 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
name: release
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.goarch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goarch: amd64
- goarch: arm64
steps:
- uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26"
cache: true
- name: Resolve version
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Build bootstrap
env:
GOOS: linux
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
mkdir -p dist
cd cmd/codedeploy-trigger
go build -mod=vendor -trimpath \
-ldflags "-X main.revision=${GITHUB_REF_NAME} -s -w" \
-o ../../dist/bootstrap
- name: Package zip
run: |
cd dist
zip -9 "lambda-codedeploy-trigger_${{ steps.version.outputs.version }}_linux_${{ matrix.goarch }}.zip" bootstrap
rm bootstrap
sha256sum "lambda-codedeploy-trigger_${{ steps.version.outputs.version }}_linux_${{ matrix.goarch }}.zip" \
> "lambda-codedeploy-trigger_${{ steps.version.outputs.version }}_linux_${{ matrix.goarch }}.zip.sha256"
- name: Attach to release
uses: softprops/action-gh-release@v3
with:
files: |
dist/lambda-codedeploy-trigger_${{ steps.version.outputs.version }}_linux_${{ matrix.goarch }}.zip
dist/lambda-codedeploy-trigger_${{ steps.version.outputs.version }}_linux_${{ matrix.goarch }}.zip.sha256
fail_on_unmatched_files: true