chore(deps): update actions/upload-artifact action to v7 #8
Workflow file for this run
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: pr-checks | |
| on: | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: pr-checks-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GO_VERSION: '1.26.x' | |
| BINARY_NAME: linkctl | |
| jobs: | |
| format-and-lint: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: true | |
| - name: Install mise & tools | |
| uses: jdx/mise-action@v2 | |
| - name: Cache Go tools | |
| id: go-tools-cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/go/bin | |
| key: ${{ runner.os }}-go-tools-${{ hashFiles('.mise.toml') }} | |
| - name: Install tooling | |
| if: steps.go-tools-cache.outputs.cache-hit != 'true' | |
| run: make tools | |
| - name: Check formatting | |
| run: | | |
| export PATH="$(go env GOPATH)/bin:$PATH" | |
| make format-check | |
| - name: Run lint | |
| run: | | |
| export PATH="$(go env GOPATH)/bin:$PATH" | |
| make lint | |
| unit-tests: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: true | |
| - name: Run unit tests | |
| run: make test-short | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: true | |
| - name: Build — macOS (arm64 / amd64) | |
| run: | | |
| mkdir -p build | |
| GOOS=darwin GOARCH=arm64 go build -o build/${{ env.BINARY_NAME }}_dev_darwin_arm64 ./cmd | |
| GOOS=darwin GOARCH=amd64 go build -o build/${{ env.BINARY_NAME }}_dev_darwin_amd64 ./cmd | |
| - name: Build — Linux (arm64 / amd64) | |
| run: | | |
| GOOS=linux GOARCH=arm64 go build -o build/${{ env.BINARY_NAME }}_dev_linux_arm64 ./cmd | |
| GOOS=linux GOARCH=amd64 go build -o build/${{ env.BINARY_NAME }}_dev_linux_amd64 ./cmd | |
| - name: Build — Windows (amd64) | |
| run: | | |
| GOOS=windows GOARCH=amd64 go build -o build/${{ env.BINARY_NAME }}_dev_windows_amd64.exe ./cmd | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pr-${{ github.event.pull_request.number }}-builds | |
| path: build/ | |
| retention-days: 3 |