forked from nirui/sshwifty
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (49 loc) · 2.09 KB
/
workflow.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
name: Sshwifty-CI
on:
push:
branches: [master, dev]
# tags: ["**-release"]
pull_request:
jobs:
CI:
runs-on: ubuntu-latest
steps:
- name: Checking out source code
uses: actions/checkout@v2
with:
fetch-depth: 50
- name: apt update
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
- run: npm install
- run: npm run generate
- run: npm run testonly
- name: Go Build
run: |
export PATH=$PATH:"$(go env GOPATH)/bin"
export GO111MODULE=on
export VERSION_VARIABLE=github.com/nirui/sshwifty/application.version
export SSHWIFTY_VERSION=$(git describe --always --dirty='*' --tag)
export SSHWIFTY_COMMIT=$(git describe --always)
export BUILD_TARGETS="darwin/amd64 windows/386 windows/amd64 openbsd/386 openbsd/amd64 openbsd/arm openbsd/arm64 freebsd/386 freebsd/amd64 freebsd/arm freebsd/arm64 linux/386 linux/amd64 linux/arm linux/arm64 linux/riscv64 linux/ppc64 linux/ppc64le linux/mips linux/mipsle linux/mips64 linux/mips64le"
go install -v github.com/mitchellh/gox@latest
CGO_ENABLED=0 GOMIPS=softfloat gox -ldflags "-s -w -X $VERSION_VARIABLE=$SSHWIFTY_VERSION" -osarch "$BUILD_TARGETS" -output "./.tmp/release/{{.Dir}}_${SSHWIFTY_VERSION}_{{.OS}}_{{.Arch}}/{{.Dir}}_{{.OS}}_{{.Arch}}"
- run: zip -r build_all.zip ./.tmp/release
- name: Upload a Build Artifact (All)
uses: actions/[email protected]
with:
name: build_all.zip
path: build_all.zip
- run: zip -r build_windows_amd64.zip ./.tmp/release/sshwifty_*_windows_amd64
- name: Upload a Build Artifact (windows)
uses: actions/[email protected]
with:
name: build_windows_amd64.zip
path: build_windows_amd64.zip
- run: zip -r build_linux_amd64.zip ./.tmp/release/sshwifty_*_linux_amd64
- name: Upload a Build Artifact (linux)
uses: actions/[email protected]
with:
name: build_linux_amd64.zip
path: build_linux_amd64.zip