Skip to content

Commit

Permalink
chore: upgrade goreleaser to v2.2.0 (dagger#8256)
Browse files Browse the repository at this point in the history
* chore: upgrade goreleaser

To get go 1.23 in goreleaser, we need to bump goreleaser up to the
latest release - there are also breaking changes and deprecations we
need to resolve.

Signed-off-by: Justin Chadwell <[email protected]>

* ci: also bump action go-version to 1.23

Signed-off-by: Justin Chadwell <[email protected]>

---------

Signed-off-by: Justin Chadwell <[email protected]>
  • Loading branch information
jedevc authored Aug 28, 2024
1 parent e1ff54f commit 16ef60d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .dagger/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (cli *CLI) Binary(

const (
// https://github.com/goreleaser/goreleaser/releases
goReleaserVersion = "v1.26.0"
goReleaserVersion = "v2.2.0"
)

// Publish the CLI using GoReleaser
Expand Down Expand Up @@ -90,7 +90,7 @@ func (cli *CLI) Publish(
ctr = ctr.WithExec([]string{"git", "tag", "0.0.0"})
}

args := []string{"release", "--clean", "--skip-validate", "--debug"}
args := []string{"release", "--clean", "--skip=validate", "--verbose"}
if tag != "" {
args = append(args, "--release-notes", fmt.Sprintf(".changes/%s.md", tag))
} else {
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/call/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ runs:
uses: actions/setup-go@v5
if: inputs.dev-engine == 'true'
with:
go-version: "1.22"
cache-dependency-path: "dev/go.sum"
go-version: "1.23"
cache-dependency-path: ".dagger/go.sum"

- name: Start dev dagger
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/engine-and-cli-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
cache-dependency-path: "dev/go.sum"
go-version: "1.23"
cache-dependency-path: ".dagger/go.sum"
- name: "Determine tag"
run: |
mkdir -p /tmp/publish
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
- name: "Test Go SDK"
run: |
cd sdk/go
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:
shell: bash
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
- name: "Test Go SDK"
run: |
cd sdk/go
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.common.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

project_name: dagger

before:
Expand Down
10 changes: 6 additions & 4 deletions .goreleaser.nightly.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
version: 2

includes:
- from_file:
path: ./.goreleaser.common.yml

nightly:
# name_template will override .Version for nightly builds:
# version_template will override .Version for nightly builds:
# https://goreleaser.com/customization/nightlies/#how-it-works
name_template: "{{ .FullCommit }}"
version_template: "{{ .FullCommit }}"

archives:
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
Expand All @@ -29,10 +31,10 @@ blobs:
- sha
region: "{{ .Env.AWS_REGION }}"
bucket: "{{ .Env.AWS_BUCKET }}"
folder: "dagger/main/{{ .Version }}"
directory: "dagger/main/{{ .Version }}"
- provider: s3
ids:
- head
region: "{{ .Env.AWS_REGION }}"
bucket: "{{ .Env.AWS_BUCKET }}"
folder: "dagger/main/head"
directory: "dagger/main/head"
6 changes: 4 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
version: 2

includes:
- from_file:
path: ./.goreleaser.common.yml

snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Tag }}-next"

archives:
- name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
Expand Down Expand Up @@ -51,7 +53,7 @@ blobs:
- provider: s3
region: "{{ .Env.AWS_REGION }}"
bucket: "{{ .Env.AWS_BUCKET }}"
folder: "dagger/releases/{{ .Version }}"
directory: "dagger/releases/{{ .Version }}"

publishers:
- name: publish-latest-version
Expand Down

0 comments on commit 16ef60d

Please sign in to comment.