Merge pull request #167 from puerco/bump-ko #10
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: {} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # needed to write releases | |
| steps: | |
| - name: Set tag name | |
| shell: bash | |
| run: | | |
| echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
| - name: Check out code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: Extract version of Go to use | |
| run: echo "GOVERSION=$(awk -F'[:@]' '/FROM golang/{print $2; exit}' Dockerfile.dev)" >> $GITHUB_ENV | |
| - name: Set up go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version: '${{ env.GOVERSION }}' | |
| check-latest: true | |
| cache: false | |
| - name: Install bom | |
| uses: kubernetes-sigs/release-actions/setup-bom@8af7b2a5596dff526de9db59b2c4b8457e9f52a1 # v0.4.0 | |
| - name: Generate SBOM | |
| shell: bash | |
| run: | | |
| bom generate -c .bom.yaml --format=json -o /tmp/sigs.k8s.io-release-utils-$TAG.spdx.json . | |
| - name: Publish Release | |
| uses: kubernetes-sigs/release-actions/publish-release@8af7b2a5596dff526de9db59b2c4b8457e9f52a1 # v0.4.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| assets: "/tmp/sigs.k8s.io-release-utils-$TAG.spdx.json" | |
| sbom: false |