Add GitHub Actions workflows for automated building and releases #1
This file contains hidden or 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
| name: CI Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| name: Test and Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.21' | |
| - name: Run go fmt | |
| run: go fmt ./... | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run tests | |
| run: go test -v ./... | |
| - name: Build | |
| run: go build -o build/flutterguard-cli | |
| - name: Verify binary | |
| run: ./build/flutterguard-cli --version | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: flutterguard-cli-linux | |
| path: build/flutterguard-cli |