-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (45 loc) · 1.51 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (45 loc) · 1.51 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
name: Release
# Creates a GitHub Release with cross-compiled binaries whenever a v* tag is
# pushed. The Docker images for the same tag are published by build.yml.
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.26"
cache: true
- name: Build binaries
run: |
set -euo pipefail
mkdir -p dist
VERSION="${GITHUB_REF_NAME#v}"
for arch in amd64 arm64; do
for bin in panel node; do
out="vortexui-${bin}-linux-${arch}"
CGO_ENABLED=0 GOOS=linux GOARCH="${arch}" go build -trimpath \
-ldflags "-s -w -X main.version=${VERSION}" \
-o "dist/${out}" "./cmd/${bin}"
tar -C dist -czf "dist/${out}.tar.gz" "${out}"
rm "dist/${out}"
done
done
(cd dist && sha256sum *.tar.gz > checksums.txt)
- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
body: |
VortexUI ${{ github.ref_name }} — see [CHANGELOG.md](https://github.com/iPmartNetwork/VortexUI/blob/master/CHANGELOG.md).
Docker images: `ghcr.io/ipmartnetwork/vortexui-{panel,node,web}:${{ github.ref_name }}`
files: |
dist/*.tar.gz
dist/checksums.txt