-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
build: | ||
runs-on: "ubuntu-latest" | ||
container: "debian:10.3" | ||
strategy: | ||
matrix: | ||
node-version: [14] | ||
steps: | ||
- name: Set up Go 1.18.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18.x | ||
id: go | ||
|
||
- name: Instasll tools | ||
shell: bash | ||
run: "apt update && apt install make curl gcc ca-certificates zip git -y" | ||
|
||
- name: Install gox | ||
run: go install github.com/mitchellh/gox@master | ||
|
||
- name: Instasll node apt repo | ||
shell: bash | ||
run: "curl -sL https://deb.nodesource.com/setup_14.x | bash -" | ||
|
||
- name: Instasll node | ||
shell: bash | ||
run: "apt install nodejs -y" | ||
|
||
- name: Step pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: latest | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build frontend | ||
run: make build-frontend | ||
|
||
- name: Build go binary | ||
shell: bash | ||
run: gox -osarch='darwin/arm64 darwin/amd64 windows/arm64 windows/amd64 linux/arm64 linux/amd64' -ldflags=" | ||
-X main.Version=$(git describe --tags $(git rev-parse HEAD)) | ||
-X main.Commit=$(git rev-parse HEAD)" ./ | ||
|
||
- name: compress go binary | ||
shell: bash | ||
run: for i in edgeRec_*; do zip "$(echo $i | sed 's/\..*//').zip" $i; done | ||
|
||
- name: Upload Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: edgeRec*.zip | ||
draft: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters