Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Goreleaser to v1.24 #8

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion goreleaser/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8

[*.{md,yml,yaml}]
[*.{md,yml,yaml,rb}]
indent_size = 2
indent_style = space
1 change: 1 addition & 0 deletions goreleaser/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
4 changes: 2 additions & 2 deletions goreleaser/.github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ updates:
labels:
- "dependencies"
commit-message:
prefix: "feat"
prefix: "chore"
include: "scope"
- package-ecosystem: "github-actions"
directory: "/"
Expand All @@ -28,5 +28,5 @@ updates:
labels:
- "dependencies"
commit-message:
prefix: "feat"
prefix: "chore"
include: "scope"
8 changes: 4 additions & 4 deletions goreleaser/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ jobs:
- uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- uses: cachix/install-nix-action@v24
- uses: cachix/install-nix-action@v25
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4
with:
go-version: stable
- uses: sigstore/cosign-installer@v3.3.0
- uses: anchore/sbom-action/download-syft@v0.15.1
- uses: sigstore/cosign-installer@v3.4.0
- uses: anchore/sbom-action/download-syft@v0.15.8
- 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@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
- uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4
with:
file: ./coverage.txt
- run: ./goreleaser check
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/.github/workflows/depsreview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- uses: actions/dependency-review-action@v3
- uses: actions/dependency-review-action@v4
with:
allow-licenses: BSD-2-Clause, BSD-3-Clause, MIT, Apache-2.0, MPL-2.0
14 changes: 4 additions & 10 deletions goreleaser/.github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
- uses: cachix/install-nix-action@v25
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4
with:
go-version: stable
- run: task docs:build
- uses: wjdp/htmltest-action@09118714cd26bef56bd3d0819e4f9b1dce6f60a9 # master
with:
path: www/site
config: www/htmltest.yml
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix develop .#docs --command task docs:test
3 changes: 3 additions & 0 deletions goreleaser/.github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ jobs:
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: "go install mvdan.cc/gofumpt@latest"
- run: "go install github.com/santhosh-tekuri/jsonschema/cmd/jv@latest"
- run: task docs:releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: task docs:generate
- run: task schema:generate
- run: task nix:licenses:generate
- run: task schema:validate
- uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5
with:
commit_message: "chore: docs auto-update"
Expand Down
6 changes: 3 additions & 3 deletions goreleaser/.github/workflows/nightly-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4
with:
go-version: stable
- uses: sigstore/cosign-installer@v3.3.0
- uses: anchore/sbom-action/download-syft@v0.15.1
- uses: sigstore/cosign-installer@v3.4.0
- uses: anchore/sbom-action/download-syft@v0.15.8
- uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- uses: cachix/install-nix-action@v24
- uses: cachix/install-nix-action@v25
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: dockerhub-login
Expand Down
10 changes: 5 additions & 5 deletions goreleaser/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v2
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
with:
path: |
./dist/*.deb
Expand Down Expand Up @@ -89,19 +89,19 @@ jobs:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4
with:
go-version: stable
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
with:
path: |
./dist/*.deb
./dist/*.rpm
./dist/*.apk
key: ${{ github.ref }}
- uses: sigstore/cosign-installer@v3.3.0
- uses: anchore/sbom-action/download-syft@v0.15.1
- uses: sigstore/cosign-installer@v3.4.0
- uses: anchore/sbom-action/download-syft@v0.15.8
- uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- uses: cachix/install-nix-action@v24
- uses: cachix/install-nix-action@v25
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: dockerhub-login
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ completions/
.idea/
manpages
output.json
!/int/pipe/dist
.direnv
16 changes: 12 additions & 4 deletions goreleaser/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ changelog:
- go mod tidy
groups:
- title: Dependency updates
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
regexp: '^.*?(feat|fix|chore)\(deps\)!?:.+$'
order: 300
- title: "New Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
Expand All @@ -83,13 +83,13 @@ changelog:
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 150
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
regexp: '^.*?(fix|refactor)(\([[:word:]]+\))??!?:.+$'
order: 200
- title: "Documentation updates"
regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
regexp: ^.*?docs?(\([[:word:]]+\))??!?:.+$
order: 400
- title: "Build process updates"
regexp: ^.*?build(\([[:word:]]+\))??!?:.+$
regexp: ^.*?(build|ci)(\([[:word:]]+\))??!?:.+$
order: 400
- title: Other work
order: 9999
Expand Down Expand Up @@ -154,6 +154,14 @@ docker_manifests:
image_templates:
- "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-amd64"
- "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-arm64"
- name_template: "{{ if .IsNightly }}goreleaser/goreleaser:nightly{{ end }}"
image_templates:
- "goreleaser/goreleaser:v{{ .Version }}-amd64"
- "goreleaser/goreleaser:v{{ .Version }}-arm64"
- name_template: "{{ if .IsNightly }}ghcr.io/goreleaser/goreleaser:nightly{{ end }}"
image_templates:
- "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-amd64"
- "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-arm64"

archives:
- name_template: >-
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.5-alpine@sha256:4db4aac30880b978cae5445dd4a706215249ad4f43d28bd7cdf7906e9be8dd6b
FROM golang:1.21.6-alpine@sha256:a6a7f1fcf12f5efa9e04b1e75020931a616cd707f14f62ab5262bfbe109aa84a

RUN apk add --no-cache bash \
curl \
Expand Down
3 changes: 1 addition & 2 deletions goreleaser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,4 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR
<a href="https://github.com/goreleaser/goreleaser/graphs/contributors"><img src="https://opencollective.com/goreleaser/contributors.svg?width=890" /></a>

## Stargazers over time

[![Stargazers over time](https://starchart.cc/goreleaser/goreleaser.svg)](https://starchart.cc/goreleaser/goreleaser)
[![Stargazers over time](https://starchart.cc/goreleaser/goreleaser.svg?variant=adaptive)](https://starchart.cc/goreleaser/goreleaser)
22 changes: 15 additions & 7 deletions goreleaser/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ env:
GO111MODULE: on
GOPROXY: https://proxy.golang.org,direct

vars:
DOCKER: '{{default "docker" .DOCKER}}'

tasks:
dev:
desc: Setup git hooks
Expand Down Expand Up @@ -83,6 +80,13 @@ tasks:
generates:
- ./www/docs/static/schema.json

schema:validate:
desc: Validate JSONSchema
cmds:
- jv ./www/docs/static/schema.json
sources:
- ./www/docs/static/schema.json

docs:generate:
desc: Generate docs
cmds:
Expand Down Expand Up @@ -124,15 +128,19 @@ tasks:
desc: Start documentation server
cmds:
- task: docs:generate
- "{{.DOCKER}} build -t mkdocs -f www/docker/Dockerfile www/docker"
- "{{.DOCKER}} run --rm -p 8000:8000 -v ${PWD}/www:/docs mkdocs"
- "mkdocs serve -f www/mkdocs.yml -a 0.0.0.0:8000"

docs:build:
desc: Build docs
cmds:
- task: docs:generate
- "{{.DOCKER}} build -t mkdocs -f www/docker/Dockerfile www/docker"
- "{{.DOCKER}} run --rm -v ${PWD}/www:/docs mkdocs build"
- "mkdocs build -f www/mkdocs.yml"

docs:test:
desc: Test docs with htmltest
cmds:
- task: docs:build
- "htmltest www/site -c www/htmltest.yml"

release:
desc: Create a new tag
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ If you're going to edit it, please:

[^1]:
Entries were either added by the companies themselves or by the maintainers after seeing it in the wild.
You can see all public repositories using GoReleaser by [searching on GitHub](https://github.com/search?q=filename%3Agoreleaser+language%3Ayaml+path%3A%2F).
You can see all public repositories using GoReleaser by [searching on GitHub](https://github.com/search?q=path%3A.goreleaser.yml+OR+path%3A.goreleaser.yaml+&type=code).
19 changes: 10 additions & 9 deletions goreleaser/cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import (

"github.com/caarlos0/ctrlc"
"github.com/caarlos0/log"
"github.com/goreleaser/goreleaser/int/artifact"
"github.com/goreleaser/goreleaser/int/deprecate"
"github.com/goreleaser/goreleaser/int/gio"
"github.com/goreleaser/goreleaser/int/logext"
"github.com/goreleaser/goreleaser/int/middleware/errhandler"
"github.com/goreleaser/goreleaser/int/middleware/logging"
"github.com/goreleaser/goreleaser/int/middleware/skip"
"github.com/goreleaser/goreleaser/int/pipeline"
"github.com/goreleaser/goreleaser/int/skips"
"github.com/goreleaser/goreleaser/internal/artifact"
"github.com/goreleaser/goreleaser/internal/deprecate"
"github.com/goreleaser/goreleaser/internal/gio"
"github.com/goreleaser/goreleaser/internal/logext"
"github.com/goreleaser/goreleaser/internal/middleware/errhandler"
"github.com/goreleaser/goreleaser/internal/middleware/logging"
"github.com/goreleaser/goreleaser/internal/middleware/skip"
"github.com/goreleaser/goreleaser/internal/pipeline"
"github.com/goreleaser/goreleaser/internal/skips"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -167,6 +167,7 @@ func setupPipeline(ctx *context.Context, options buildOpts) []pipeline.Piper {
}

func setupBuildContext(ctx *context.Context, options buildOpts) error {
ctx.Action = context.ActionBuild
ctx.Deprecated = options.deprecated // test only
ctx.Parallelism = runtime.GOMAXPROCS(0)
if options.parallelism > 0 {
Expand Down
11 changes: 8 additions & 3 deletions goreleaser/cmd/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package cmd
import (
"testing"

"github.com/goreleaser/goreleaser/int/pipeline"
"github.com/goreleaser/goreleaser/int/skips"
"github.com/goreleaser/goreleaser/int/testctx"
"github.com/goreleaser/goreleaser/internal/pipeline"
"github.com/goreleaser/goreleaser/internal/skips"
"github.com/goreleaser/goreleaser/internal/testctx"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -137,6 +137,11 @@ func TestBuildFlags(t *testing.T) {
return ctx
}

t.Run("action", func(t *testing.T) {
ctx := setup(buildOpts{})
require.Equal(t, context.ActionBuild, ctx.Action)
})

t.Run("snapshot", func(t *testing.T) {
ctx := setup(buildOpts{
snapshot: true,
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/caarlos0/ctrlc"
"github.com/caarlos0/log"
"github.com/goreleaser/goreleaser/int/pipe/defaults"
"github.com/goreleaser/goreleaser/internal/pipe/defaults"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"

"github.com/caarlos0/log"
"github.com/goreleaser/goreleaser/int/logext"
"github.com/goreleaser/goreleaser/internal/logext"
"github.com/goreleaser/goreleaser/pkg/config"
)

Expand Down
4 changes: 2 additions & 2 deletions goreleaser/cmd/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/caarlos0/ctrlc"
"github.com/caarlos0/log"
"github.com/charmbracelet/lipgloss"
"github.com/goreleaser/goreleaser/int/middleware/skip"
"github.com/goreleaser/goreleaser/int/pipe/defaults"
"github.com/goreleaser/goreleaser/internal/middleware/skip"
"github.com/goreleaser/goreleaser/internal/pipe/defaults"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/goreleaser/goreleaser/pkg/healthcheck"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/cmd/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"testing"

"github.com/goreleaser/goreleaser/int/skips"
"github.com/goreleaser/goreleaser/internal/skips"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion goreleaser/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"regexp"

"github.com/caarlos0/log"
"github.com/goreleaser/goreleaser/int/static"
"github.com/goreleaser/goreleaser/internal/static"
"github.com/spf13/cobra"
)

Expand Down
17 changes: 9 additions & 8 deletions goreleaser/cmd/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (

"github.com/caarlos0/ctrlc"
"github.com/caarlos0/log"
"github.com/goreleaser/goreleaser/int/deprecate"
"github.com/goreleaser/goreleaser/int/logext"
"github.com/goreleaser/goreleaser/int/middleware/errhandler"
"github.com/goreleaser/goreleaser/int/middleware/logging"
"github.com/goreleaser/goreleaser/int/middleware/skip"
"github.com/goreleaser/goreleaser/int/pipe/git"
"github.com/goreleaser/goreleaser/int/pipeline"
"github.com/goreleaser/goreleaser/int/skips"
"github.com/goreleaser/goreleaser/internal/deprecate"
"github.com/goreleaser/goreleaser/internal/logext"
"github.com/goreleaser/goreleaser/internal/middleware/errhandler"
"github.com/goreleaser/goreleaser/internal/middleware/logging"
"github.com/goreleaser/goreleaser/internal/middleware/skip"
"github.com/goreleaser/goreleaser/internal/pipe/git"
"github.com/goreleaser/goreleaser/internal/pipeline"
"github.com/goreleaser/goreleaser/internal/skips"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -171,6 +171,7 @@ func releaseProject(options releaseOpts) (*context.Context, error) {
}

func setupReleaseContext(ctx *context.Context, options releaseOpts) error {
ctx.Action = context.ActionRelease
ctx.Deprecated = options.deprecated // test only
ctx.Parallelism = runtime.GOMAXPROCS(0)
if options.parallelism > 0 {
Expand Down
Loading
Loading