-
Notifications
You must be signed in to change notification settings - Fork 53
55 lines (51 loc) · 1.63 KB
/
build-release-assets.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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Build Release Assets
on:
release:
types: [published]
jobs:
build-release-x86_64:
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
cache-dependency-path: |
subdir/go.sum
tools/go.sum
- name: Build and archive x86_64 distribution
run: make zip-x86_64
- name: Publish x86_64 release on GitHub
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
file=/tmp/newrelic-lambda-extension.x86_64.zip
echo "uploading $file to release $TAG"
gh release upload "$TAG" "$file"
build-release-arm:
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
cache-dependency-path: |
subdir/go.sum
tools/go.sum
- name: Build and archive arm distribution
run: make zip-arm64
- name: Publish zip-arm64 release on GitHub
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
file=/tmp/newrelic-lambda-extension.arm64.zip
echo "uploading $file to release $TAG"
gh release upload "$TAG" "$file"