-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed path separators that caused file-not-found error under Linux Added auto-build workflow Added manual starter for the workflow Adding release tag for the release push Added release tag for the release push Added release tag generator for the release push Fixed permissions for release pushing Fixed permissions for release pushing
- Loading branch information
1 parent
39f8579
commit c2b858b
Showing
5 changed files
with
79 additions
and
57 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: Build Groxy and Release Binaries | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
|
||
build_and_push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Build Groxy in Linux x64 | ||
run: go build -v -o ./groxy_linux_x64 ./groxy.go | ||
|
||
- name: Build Groxy in Windows x64 | ||
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -o ./groxy_windows_x64.exe ./groxy.go | ||
|
||
- name: Build Groxy in Darwin x64 | ||
run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -v -o ./groxy_darwin_x64 ./groxy.go | ||
|
||
- name: Build simple_serv in Linux x64 | ||
run: go build -v -o ./simple_serv_linux_x64 ./testSuites/simple_serv.go | ||
|
||
- name: Build Groxy in Windows x64 | ||
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -o ./simple_serv_windows_x64.exe ./testSuites/simple_serv.go | ||
|
||
- name: Build Groxy in Darwin x64 | ||
run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -v -o ./simple_serv_darwin_x64 ./testSuites/simple_serv.go | ||
|
||
- name: Generate release tag | ||
id: tag | ||
run: | | ||
echo "::set-output name=release_tag::Groxy_Build_$(date +"%Y.%m.%d_%H-%M")" | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: # 将下述可执行文件 release 上 去 | ||
tag_name: ${{ steps.tag.outputs.release_tag }} | ||
files: | | ||
groxy_linux_x64 | ||
groxy_windows_x64.exe | ||
groxy_darwin_x64 | ||
simple_serv_linux_x64 | ||
simple_serv_windows_x64.exe | ||
simple_serv_darwin_x64 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
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