add analytics #55
Workflow file for this run
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 workflow will build and test a Golang project | |
# For more information, see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Build and Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Make sure the project can build | |
run: | | |
mkdir -p dist | |
# Build for Linux (default) | |
go build -o dist/TimecodeTool-linux-amd64 cmd/TimecodeTool/main.go | |
# Build for macOS arm64 | |
GOOS=darwin GOARCH=arm64 go build -o dist/TimecodeTool-osx-arm64 cmd/TimecodeTool/main.go | |
# Build for Windows amd64 | |
GOOS=windows GOARCH=amd64 go build -o dist/TimecodeTool-windows-amd64.exe cmd/TimecodeTool/main.go | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run tests | |
run: go test -v ./... |