build(deps): bump actions/setup-go from 5 to 6 #294
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: | |
| release: | |
| types: [published] | |
| jobs: | |
| build_and_release: | |
| name: Build and Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup go-task | |
| uses: arduino/setup-task@v2 | |
| with: | |
| version: 3.x | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.24.x' | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| cache-dependency-path: | | |
| datatrails-common-api/go.sum | |
| - name: Setup protobuf | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| version: "30.2" | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup protoc-gen-doc | |
| run: | | |
| go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1 | |
| - name: Generate, Test and Export | |
| run: | | |
| task all | |
| - name: Vulnerability check | |
| run: | | |
| cd datatrails-common-api | |
| go run golang.org/x/vuln/cmd/govulncheck@latest -show verbose ./... | |
| - name: Show exports | |
| working-directory: exported/ | |
| run: find . -type d | |
| - name: Publish release artifacts | |
| if: ${{ github.event_name == 'release' }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| working-directory: exported | |
| run: | | |
| TAG="$(echo "${GITHUB_REF}" | grep tags | grep -o "[^/]*$" || true)" | |
| # this test will fail if the event type is not 'published' | |
| if [ -z "$TAG" ]; then | |
| echo "::error ::This is not a tagged release" | |
| exit 1 | |
| fi | |
| find . -type d | |
| tar -czf proto-include.tar.gz proto-include | |
| gh release upload $TAG proto-include.tar.gz | |
| tar -czf swagger.tar.gz swagger | |
| gh release upload $TAG swagger.tar.gz | |
| tar -czf go-datatrails-common-api-gen.tar.gz go-datatrails-common-api-gen | |
| gh release upload $TAG go-datatrails-common-api-gen.tar.gz |