-
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.
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
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,41 @@ | ||
name: Audit | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
|
||
audit: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Verify dependencies | ||
run: go mod verify | ||
|
||
- name: Prepare build dir | ||
run: mkdir build | ||
- name: Build Linux | ||
run: go build -ldflags "-s -w" -o build/mosaic | ||
- name: Build Win | ||
run: env GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o build/mosaic.exe | ||
- name: Build Mac | ||
run: env GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o build/mosaic-darwin | ||
|
||
- name: Run tests | ||
run: go test -race -vet=off ./... | ||
|
||
- name: 'Upload Artifact' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifact | ||
path: build | ||
retention-days: 30 |
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