Update CI: checkout@v5, setup-go@v6, Go 1.25 #4
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "*" | |
| pull_request: | |
| jobs: | |
| build-test-release-alpine-amd64: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [amd64, arm64] | |
| env: | |
| GOOS: linux | |
| GOARCH: ${{ matrix.arch }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25 | |
| - name: build | |
| run: make | |
| - name: test | |
| # @fixme: return test for non-amd64 arch when github will add support for other architectures (arm64) | |
| if: ${{ matrix.arch == 'amd64' }} | |
| run: make test | |
| - name: prepare artifact | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: make package | |
| - name: Get the version | |
| if: startsWith(github.ref, 'refs/tags/') | |
| id: get_version | |
| run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
| - uses: xresloader/upload-to-github-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| file: gotpl-*.tar.gz | |
| overwrite: false | |
| tags: true | |
| draft: false | |
| tag_name: ${{ steps.get_version.outputs.VERSION }} |