Upgrade dependencies #43
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: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.go-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: [ 1.21, 1.22, 1.23, 1.24, 1.25, 1.26 ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache-dependency-path: go.sum | |
| - name: Install tooling | |
| run: | | |
| go install github.com/go-task/task/v3/cmd/task@latest | |
| go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | |
| - name: Lint | |
| run: task lint | |
| - name: Test | |
| run: task test | |
| - uses: act10ns/slack@v1 | |
| with: | |
| status: ${{ job.status }} | |
| steps: ${{ toJson(steps) }} | |
| if: failure() | |
| build-examples: | |
| name: Build Examples (Go 1.26) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.26 | |
| cache-dependency-path: go.sum | |
| - name: Install tooling | |
| run: | | |
| go install github.com/go-task/task/v3/cmd/task@latest | |
| go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | |
| - name: Test examples | |
| run: task test_examples | |
| - uses: act10ns/slack@v1 | |
| with: | |
| status: ${{ job.status }} | |
| steps: ${{ toJson(steps) }} | |
| if: failure() | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.26 | |
| - name: Publish Release on GitHub | |
| env: | |
| DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} | |
| GITHUB_OWNER: ${{ github.repository_owner }} | |
| GITHUB_REPO: ${{ github.event.repository.name }} | |
| GITHUB_SHA: ${{ github.sha }} | |
| run: | | |
| . ./.github/next_version.sh | |
| PREVIOUS_VERSION=$(git describe --tags --abbrev=0) | |
| echo "Previous version: ${PREVIOUS_VERSION}" | |
| NEXT_VERSION=$(next_version ${PREVIOUS_VERSION} 2) | |
| if [ -z "${NEXT_VERSION}" ]; then | |
| echo "Could not resolve next version successfully, exiting." | |
| exit 1 | |
| fi | |
| echo "Next version: ${NEXT_VERSION}" | |
| go install github.com/tcnksm/ghr@latest | |
| export PATH="$PATH:$(go env GOPATH)/bin" | |
| ghr -t "${DEPLOY_TOKEN}" -u "${GITHUB_OWNER}" -r "${GITHUB_REPO}" -c "${GITHUB_SHA}" "${NEXT_VERSION}" | |
| - uses: act10ns/slack@v1 | |
| with: | |
| status: ${{ job.status }} | |
| steps: ${{ toJson(steps) }} |