chore(deps): update go module dependencies #58
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: Test and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: read | |
| checks: write | |
| jobs: | |
| lint: | |
| if: "!contains(github.event.head_commit.message, 'chore(main)')" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '^1.23.0' | |
| test: | |
| if: "!contains(github.event.head_commit.message, 'chore(main)')" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| actions: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '^1.23.0' # The Go version to download (if necessary) and use. | |
| - name: Install Tools and Protoc Plugins via Makefile | |
| run: make init | |
| - name: Run tests | |
| run: make test | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '^1.23.0' | |
| - name: Create Release and Changelog | |
| id: release | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| config-file: release-please-config.json | |
| manifest-file: .github/.release-please-manifest.json | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Tools and Protoc Plugins via Makefile | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: make init | |
| - name: Push to Buf Schema Registry | |
| if: ${{ steps.release.outputs.release_created }} | |
| env: | |
| BUF_TOKEN: ${{ secrets.BUF_TOKEN }} | |
| run: | | |
| buf push | |
| buf push --label ${{ steps.release.outputs.tag_name }} | |
| - name: Notify on new release | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| echo "New release created: ${{ steps.release.outputs.tag_name }}" | |
| echo "Release notes: ${{ steps.release.outputs.release_notes }}" |