-
Notifications
You must be signed in to change notification settings - Fork 26
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
5 changed files
with
125 additions
and
84 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,93 @@ | ||
|
||
name: Reusable build workflow | ||
on: | ||
workflow_call: | ||
|
||
# shared build jobs | ||
jobs: | ||
build_linux_binary: | ||
name: Build Linux binary | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# setup global dependencies | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.x | ||
|
||
# setup project dependencies | ||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
# build binaries | ||
- name: Build linux binary | ||
run: | | ||
make linux | ||
# upload artifacts | ||
- name: "Upload artifact: explorer_linux_amd64" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./bin/explorer_linux_amd64 | ||
name: explorer_linux_amd64 | ||
|
||
build_windows_binary: | ||
name: Build Windows binary | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# setup global dependencies | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.x | ||
|
||
# setup project dependencies | ||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
# build binaries | ||
- name: Build windows binary | ||
run: | | ||
make windows | ||
# upload artifacts | ||
- name: "Upload artifact: explorer_windows_amd64.exe" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./bin/explorer_windows_amd64.exe | ||
name: explorer_windows_amd64.exe | ||
|
||
build_darwin_binary: | ||
name: Build MacOS binary | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# setup global dependencies | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.x | ||
|
||
# setup project dependencies | ||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
# build binaries | ||
- name: Build macos binary | ||
run: | | ||
make darwin | ||
# upload artifacts | ||
- name: "Upload artifact: explorer_darwin_amd64" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./bin/explorer_darwin_amd64 | ||
name: explorer_darwin_amd64 |
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