Multiple Fixes (#4) #25
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: Go | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags-ignore: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| - name: Golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| continue-on-error: true | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| - name: Install dependencies | |
| run: | | |
| go get . | |
| - name: Test with the Go CLI | |
| run: go test | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # Define target OS and Architectures | |
| include: | |
| - os: linux | |
| arch: amd64 | |
| - os: windows | |
| arch: amd64 | |
| - os: darwin | |
| arch: arm64 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| - name: Install dependencies | |
| run: | | |
| go get . | |
| - name: Set Short SHA | |
| id: vars | |
| run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Build Binary | |
| # GOOS and GOARCH tell Go which platform to target | |
| run: | | |
| GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o rioctl-${{ steps.vars.outputs.sha_short }}-${{ matrix.os }}-${{ matrix.arch }} . | |
| # - name: Upload Artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: rioctl-${{ steps.vars.outputs.sha_short }}-${{ matrix.os }}-${{ matrix.arch }} | |
| # path: rioctl-${{ steps.vars.outputs.sha_short }}-${{ matrix.os }}-${{ matrix.arch }}* |