Update README.md #105
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
| on: [push, pull_request] | |
| name: Test, Build and Publish | |
| jobs: | |
| tests: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Run tests | |
| run: go test -race ./... | |
| goreleaser: | |
| name: Build and Publish | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| check_brew: | |
| name: Check Brew Tap | |
| needs: goreleaser | |
| runs-on: macos-latest | |
| steps: | |
| - name: Install gitmux with brew | |
| run: | | |
| brew tap arl/arl | |
| brew install gitmux | |
| gitmux -V | |
| - name: Check installed gitmux version | |
| run: | | |
| [ v$(gitmux -V) == "$GITHUB_REF_NAME" ] |