Skip to content

Commit

Permalink
feat: update goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Oct 7, 2023
1 parent 0b0a279 commit b6ffd34
Show file tree
Hide file tree
Showing 474 changed files with 24,110 additions and 14,449 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Expand Up @@ -10,30 +10,30 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
- uses: golangci/golangci-lint-action@v3
with:
args: --timeout=5m
build:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
- run: go build ./cmd/hooks-goreleaser/
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'
- run: ./scripts/build-local.sh
- uses: go-semantic-release/action@v1
with:
Expand Down
279 changes: 145 additions & 134 deletions go.mod

Large diffs are not rendered by default.

3,672 changes: 366 additions & 3,306 deletions go.sum

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions goreleaser/.gitattributes
Expand Up @@ -9,3 +9,7 @@ www/docs/static/schema.json linguist-generated=true
www/docs/static/schema-pro.json linguist-generated=true
www/docs/static/releases.json linguist-generated=true
www/docs/static/releases-pro.json linguist-generated=true
*.nix.golden linguist-language=Nix
*.rb.golden linguist-language=Ruby
*.json.golden linguist-language=JSON
*.yaml.golden linguist-language=YAML
12 changes: 9 additions & 3 deletions goreleaser/.github/ISSUE_TEMPLATE/bug.yaml
Expand Up @@ -26,15 +26,15 @@ body:
id: goreleaser-version
attributes:
label: goreleaser version
description: '`goreleaser --version` output'
description: "`goreleaser --version` output"
render: bash
validations:
required: true
- type: checkboxes
id: goreleaser-check
attributes:
label: GoReleaser Check
description: 'If I run `goreleaser check` it shows no errors'
description: "If I run `goreleaser check` it shows no errors"
options:
- label: goreleaser check shows no errors
required: true
Expand All @@ -43,8 +43,14 @@ body:
attributes:
label: Search
options:
- label: I did search for other open and closed issues before opening this.
- label: I did search for other open and closed issues before opening this
required: true
- type: checkboxes
id: supporter
attributes:
label: Supporter
options:
- label: I am a [sponsor](https://github.com/sponsors/caarlos0/) or a [Pro](https://goreleaser.com/pro) customer
- type: checkboxes
id: terms
attributes:
Expand Down
8 changes: 7 additions & 1 deletion goreleaser/.github/ISSUE_TEMPLATE/feature.yaml
Expand Up @@ -34,8 +34,14 @@ body:
attributes:
label: Search
options:
- label: I did search for other open and closed issues before opening this.
- label: I did search for other open and closed issues before opening this
required: true
- type: checkboxes
id: supporter
attributes:
label: Supporter
options:
- label: I am a [sponsor](https://github.com/sponsors/caarlos0/) or a [Pro](https://goreleaser.com/pro) customer
- type: checkboxes
id: terms
attributes:
Expand Down
42 changes: 21 additions & 21 deletions goreleaser/.github/workflows/build.yml
Expand Up @@ -3,59 +3,59 @@ name: build
on:
push:
branches:
- 'main'
- "main"
pull_request:
paths:
- 'go.*'
- '**/*.go'
- 'Taskfile.yml'
- 'Dockerfile'
- '.github/workflows/*.yml'
- "go.*"
- "**/*.go"
- "Taskfile.yml"
- "Dockerfile"
- ".github/workflows/*.yml"

permissions:
contents: read

jobs:
govulncheck:
uses: caarlos0/meta/.github/workflows/govulncheck.yml@main
with:
cache: true
go-version: '>=1.20.0'
semgrep:
uses: caarlos0/meta/.github/workflows/semgrep.yml@main
ruleguard:
uses: caarlos0/meta/.github/workflows/ruleguard.yml@main
with:
cache: true
go-version: '>=1.20.0'
args: '-disable largeloopcopy'
args: "-disable largeloopcopy"
test:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
with:
fetch-depth: 0
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2
- uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v2
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # 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
- uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- uses: cachix/install-nix-action@v23
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '>=1.20.0'
cache: true
- uses: sigstore/cosign-installer@v2.8.1
- uses: anchore/sbom-action/download-syft@v0.13.3
go-version: stable
- uses: sigstore/cosign-installer@v3.1.2
- uses: anchore/sbom-action/download-syft@v0.14.3
- name: setup-validate-krew-manifest
run: go install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest
- name: setup-tparse
Expand All @@ -66,7 +66,7 @@ jobs:
task build
- name: test
run: ./scripts/test.sh
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
with:
file: ./coverage.txt
- run: ./goreleaser check
Expand Down
13 changes: 6 additions & 7 deletions goreleaser/.github/workflows/codeql.yml
Expand Up @@ -15,11 +15,10 @@ jobs:
contents: read

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '>=1.20.0'
cache: true
- uses: github/codeql-action/init@39d8d7e78f59cf6b40ac3b9fbebef0c753d7c9e5 # v2
- uses: github/codeql-action/autobuild@39d8d7e78f59cf6b40ac3b9fbebef0c753d7c9e5 # v2
- uses: github/codeql-action/analyze@39d8d7e78f59cf6b40ac3b9fbebef0c753d7c9e5 # v2
go-version: stable
- uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # v2
- uses: github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a # v2
- uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # v2
2 changes: 1 addition & 1 deletion goreleaser/.github/workflows/depsreview.yaml
Expand Up @@ -8,7 +8,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
- uses: actions/dependency-review-action@v3
with:
allow-licenses: BSD-2-Clause, BSD-3-Clause, MIT, Apache-2.0, MPL-2.0
14 changes: 8 additions & 6 deletions goreleaser/.github/workflows/docs.yml
Expand Up @@ -3,12 +3,14 @@ name: docs
on:
push:
branches:
- 'main'
- "main"
paths:
- 'www/*'
- "www/**/*"
- ".github/workflows/docs.yml"
pull_request:
paths:
- 'www/*'
- "www/**/*"
- ".github/workflows/docs.yml"

permissions:
contents: read
Expand All @@ -17,13 +19,13 @@ jobs:
htmltest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '>=1.20.0'
go-version: stable
- run: task docs:build
- uses: wjdp/htmltest-action@09118714cd26bef56bd3d0819e4f9b1dce6f60a9 # master
with:
Expand Down
6 changes: 3 additions & 3 deletions goreleaser/.github/workflows/fig.yml
Expand Up @@ -13,10 +13,10 @@ jobs:
fig:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '>=1.20.0'
go-version: stable
cache: true
- run: go run . generate-fig-spec >goreleaser.ts
- uses: withfig/push-to-fig-autocomplete-action@v1
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/.github/workflows/generate-releases.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
with:
token: ${{ secrets.GH_PAT }}
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
Expand Down
6 changes: 3 additions & 3 deletions goreleaser/.github/workflows/generate.yml
Expand Up @@ -19,12 +19,12 @@ jobs:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
with:
token: ${{ secrets.GH_PAT }}
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '>=1.20.0'
go-version: stable
cache: true
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
- run: task docs:generate
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/.github/workflows/gitleaks.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/.github/workflows/grype.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: read

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
- uses: anchore/scan-action@v3
with:
path: "."
Expand Down
10 changes: 5 additions & 5 deletions goreleaser/.github/workflows/lint.yml
Expand Up @@ -17,12 +17,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: '>=1.20.0'
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
go-version: stable
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3
with:
skip-go-installation: true
args: --timeout=5m
2 changes: 1 addition & 1 deletion goreleaser/.github/workflows/milestone.yml
Expand Up @@ -25,7 +25,7 @@ jobs:
statuses: none

steps:
- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
with:
script: |
if (!context.payload.pull_request.merged) {
Expand Down
57 changes: 57 additions & 0 deletions goreleaser/.github/workflows/nightly-oss.yml
@@ -0,0 +1,57 @@
name: nightly-oss

on:
workflow_dispatch:
schedule:
- cron: 0 0 * * 4

permissions:
contents: write
id-token: write
packages: write

jobs:
goreleaser:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
with:
fetch-depth: 0
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v2
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v2
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version: stable
- uses: sigstore/cosign-installer@v3.1.2
- uses: anchore/sbom-action/download-syft@v0.14.3
- uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- uses: cachix/install-nix-action@v23
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: dockerhub-login
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: ghcr-login
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
version: nightly
args: release --clean --nightly -f .goreleaser-nightly.yaml --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

0 comments on commit b6ffd34

Please sign in to comment.