-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (59 loc) · 2.09 KB
/
build.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
56
57
58
59
60
61
62
63
64
65
66
67
name: build
permissions:
contents: write
on:
push:
paths:
- "VERSION"
branches:
- main
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>1.18'
check-latest: true
cache: false
- name: Install dependencies
run: |
cd picocrypt
go mod download
- name: Build
run: |
cd picocrypt
GOOS=windows GOARCH=386 go build -v -ldflags="-s -w" -o picocrypt-windows-386.exe .
GOOS=windows GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-windows-amd64.exe .
GOOS=windows GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-windows-arm64.exe .
GOOS=darwin GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-macos-amd64 .
GOOS=darwin GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-macos-arm64 .
GOOS=linux GOARCH=386 go build -v -ldflags="-s -w" -o picocrypt-linux-386 .
GOOS=linux GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-linux-amd64 .
GOOS=linux GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-linux-arm64 .
GOOS=linux GOARCH=riscv64 go build -v -ldflags="-s -w" -o picocrypt-linux-riscv64 .
GOOS=wasip1 GOARCH=wasm go build -v -ldflags="-s -w" -o picocrypt-wasip1.wasm .
env:
CGO_ENABLED: 0
- name: Get version tag
run: |
VERSION=$(cat VERSION)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
picocrypt/picocrypt-windows-386.exe
picocrypt/picocrypt-windows-amd64.exe
picocrypt/picocrypt-windows-arm64.exe
picocrypt/picocrypt-macos-amd64
picocrypt/picocrypt-macos-arm64
picocrypt/picocrypt-linux-386
picocrypt/picocrypt-linux-amd64
picocrypt/picocrypt-linux-arm64
picocrypt/picocrypt-linux-riscv64
picocrypt/picocrypt-wasip1.wasm
tag_name: ${{ env.VERSION }}
make_latest: true