-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 1.84 KB
/
release.yml
File metadata and controls
71 lines (62 loc) · 1.84 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
60
61
62
63
64
65
66
67
68
69
70
71
name: Release
on:
release:
types: [created]
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.artifact }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
artifact: mind-map-linux-x64
- goos: linux
goarch: arm64
artifact: mind-map-linux-arm64
- goos: darwin
goarch: amd64
artifact: mind-map-darwin-x64
- goos: darwin
goarch: arm64
artifact: mind-map-darwin-arm64
- goos: windows
goarch: amd64
artifact: mind-map-windows-x64.exe
- goos: windows
goarch: arm64
artifact: mind-map-windows-arm64.exe
steps:
- uses: actions/checkout@v5
- name: Build in devcontainer
uses: devcontainers/ci@v0.3
with:
push: never
runCmd: |
set -e
# Build webui
cd webui && npm install && npm run build && cd ..
# Cross-compile (pure Go, no CGO needed)
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \
go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" \
-o ${{ matrix.artifact }} ./cmd/mind-map/
# Package as tarball
tar czf ${{ matrix.artifact }}.tar.gz ${{ matrix.artifact }}
- name: Upload release asset
uses: softprops/action-gh-release@v3
with:
files: ${{ matrix.artifact }}.tar.gz
upload-install-script:
name: Upload install scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Upload install.sh and install.ps1
uses: softprops/action-gh-release@v3
with:
files: |
install.sh
install.ps1