mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-26 04:22:05 +02:00
d19ff6eb1e
split build & release workflows Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
61 lines
2.0 KiB
YAML
61 lines
2.0 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
govulncheck:
|
|
uses: caarlos0/meta/.github/workflows/govulncheck.yml@main
|
|
semgrep:
|
|
uses: caarlos0/meta/.github/workflows/semgrep.yml@main
|
|
ruleguard:
|
|
uses: caarlos0/meta/.github/workflows/ruleguard.yml@main
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
|
steps:
|
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: arduino/setup-task@ca745e18916de727f841ec824ac20a615f1cddea # v1
|
|
with:
|
|
version: 3.x
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
|
|
- uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
|
|
- 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@268d8c0ca0432bb2cf416faae41297df9d262d7f # v3
|
|
with:
|
|
go-version: '1.19'
|
|
cache: true
|
|
- uses: sigstore/cosign-installer@v2.6.0
|
|
- uses: anchore/sbom-action/download-syft@v0.12.0
|
|
- 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@81cd2dc8148241f03f5839d295e000b8f761e378 # v3
|
|
with:
|
|
file: ./coverage.txt
|
|
- run: ./goreleaser check
|
|
- run: git diff
|