-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.33 KB
/
Copy pathrelease.yml
File metadata and controls
44 lines (37 loc) · 1.33 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
# Builds release binaries when a v* tag is pushed. The self-updater in
# nodeosd downloads exactly these assets and verifies them against SHA256SUMS.
name: release
on:
push:
tags: ["v*"]
workflow_dispatch: {}
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.26"
- name: Test
run: go vet ./... && go test ./...
- name: Build
run: |
mkdir -p dist
# the tag is the version the running daemon reports, so the
# self-updater compares against what was actually released
VERSION="${GITHUB_REF_NAME#v}"
LDFLAGS="-s -w -X main.version=${VERSION}"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "$LDFLAGS" -o dist/nodeosd-linux-amd64 ./cmd/nodeosd
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags "$LDFLAGS" -o dist/nodeosd-linux-arm64 ./cmd/nodeosd
cd dist && sha256sum nodeosd-linux-amd64 nodeosd-linux-arm64 > SHA256SUMS
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: |
dist/nodeosd-linux-amd64
dist/nodeosd-linux-arm64
dist/SHA256SUMS
generate_release_notes: true