File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ** Features:**
2+
3+ ** Fixes:**
Original file line number Diff line number Diff line change 1+ name : Build Go
2+
3+ on :
4+ push :
5+ branches :
6+ - " main"
7+ pull_request :
8+ branches :
9+ - " main"
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v3
17+
18+ - name : Set up go
19+ uses : actions/setup-go@v3
20+ with :
21+ go-version : 1.19.2
22+
23+ - name : Build
24+ run : go build ./...
25+
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ release :
10+ if : contains(github.ref, 'refs/tags/')
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v3
15+
16+ - name : Set up go
17+ uses : actions/setup-go@v3
18+ with :
19+ go-version : 1.19.3
20+
21+ - name : Build
22+ run : bash hack/github-release.sh
23+
24+ - name : Create release
25+ uses : softprops/action-gh-release@v1
26+ with :
27+ token : ${{ secrets.RELEASE_GITHUB_TOKEN }}
28+ files : |
29+ out/*.zip
30+
Original file line number Diff line number Diff line change 11out
22.vscode /
33.idea /
4+ bin /
Original file line number Diff line number Diff line change @@ -34,10 +34,6 @@ build-windows-amd64:
3434.PHONY : build-all
3535build-all : build-darwin-amd64 build-darwin-arm64 build-linux-arm64 build-linux-amd64 build-windows-amd64
3636
37- .PHONY : release
38- release :
39- @gitflow run release -f .gitflow.yaml
40-
4137.PHONY : fmt
4238fmt :
4339 gofmt -w -s $(GOFMT_FILES )
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -ue
4+
5+ targets=( \
6+ " darwin_amd64" \
7+ " darwin_arm64" \
8+ " linux_amd64" \
9+ " linux_arm64" \
10+ " windows_amd64" \
11+ " windows_arm64" \
12+ )
13+
14+ VERSION=${GITHUB_REF# refs/*/ }
15+ echo " VERSION=${VERSION} " >> $GITHUB_ENV
16+
17+ mkdir -p out
18+
19+ for target in " ${targets[@]} " ; do
20+ echo " Build target: ${target} "
21+ IFS=' _' read -r -a tmp <<< " $target"
22+ BUILD_OS=" ${tmp[0]} "
23+ BUILD_ARCH=" ${tmp[1]} "
24+ GOOS=" ${BUILD_OS} " GOARCH=" ${BUILD_ARCH} " go build -mod=vendor -o bin/ucloud
25+ zip -r out/ucloud-${target} .zip ./bin LICENSE
26+ done
You can’t perform that action at this time.
0 commit comments