mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-08 03:31:59 +02:00
cac3f17562
latest and greatest Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
74 lines
2.2 KiB
YAML
74 lines
2.2 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
pull_request:
|
|
paths:
|
|
- 'go.*'
|
|
- '**/*.go'
|
|
- 'Taskfile.yml'
|
|
- 'Dockerfile'
|
|
- '.github/workflows/build.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
govulncheck:
|
|
uses: caarlos0/meta/.github/workflows/govulncheck.yml@main
|
|
with:
|
|
cache: true
|
|
go-version: '>=1.19.4'
|
|
semgrep:
|
|
uses: caarlos0/meta/.github/workflows/semgrep.yml@main
|
|
ruleguard:
|
|
uses: caarlos0/meta/.github/workflows/ruleguard.yml@main
|
|
with:
|
|
cache: true
|
|
go-version: '>=1.19.4'
|
|
args: '-disable largeloopcopy'
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
|
steps:
|
|
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: arduino/setup-task@d665c6beebae46ff3f699d7b2fd3f1959de7153c # v1
|
|
with:
|
|
version: 3.x
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2
|
|
- uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2
|
|
- name: setup-snapcraft
|
|
# FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft
|
|
mkdir -p $HOME/.cache/snapcraft/download
|
|
mkdir -p $HOME/.cache/snapcraft/stage-packages
|
|
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
|
|
with:
|
|
go-version: '>=1.19.4'
|
|
cache: true
|
|
- uses: sigstore/cosign-installer@v2.8.1
|
|
- uses: anchore/sbom-action/download-syft@v0.13.1
|
|
- name: setup-validate-krew-manifest
|
|
run: go install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest
|
|
- name: setup-tparse
|
|
run: go install github.com/mfridman/tparse@latest
|
|
- name: setup
|
|
run: |
|
|
task setup
|
|
task build
|
|
- name: test
|
|
run: ./scripts/test.sh
|
|
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3
|
|
with:
|
|
file: ./coverage.txt
|
|
- run: ./goreleaser check
|
|
- run: git diff
|