Refactor the repository before release #2
Workflow file for this run
This file contains 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: | |
pull_request: | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Unshallow | |
run: git fetch --prune --unshallow | |
- | |
id: vars | |
run: | | |
goVersion=$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2) | |
echo "go_version=${goVersion}" >> $GITHUB_OUTPUT | |
echo "Using Go version ${goVersion}" | |
- | |
name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ steps.vars.outputs.go_version }} | |
- | |
name: Install syft | |
run: | | |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin | |
- | |
name: Build | |
uses: goreleaser/goreleaser-action@v5.0.0 | |
with: | |
version: latest | |
args: build --config=.github/goreleaser.yml --clean --snapshot | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Scan dependencies | |
uses: anchore/sbom-action@v0 | |
with: | |
dependency-snapshot: true |