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

[ci] remove duplicate s3 unversioned builds in favor of name_templates #1244

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 32 additions & 36 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,6 @@ builds:
- windows_amd64
- windows_arm64
binary: bin/step
-
# This build is for S3 binaries that follow our naming convention there.
<< : *BUILD
id: s3-versioned
targets:
- darwin_amd64
- darwin_arm64
- linux_amd64
- linux_arm64
- windows_amd64
- freebsd_amd64
binary: 'step_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
-
# This build is for S3 unversioned binaries that follow our naming convention there.
<< : *BUILD
id: s3-unversioned
targets:
- darwin_amd64
- darwin_arm64
- linux_amd64
- linux_arm64
- windows_amd64
- freebsd_amd64
binary: 'step_latest_{{ .Os }}_{{ .Arch }}'
-
# This build is specifically for nFPM targets (.deb and .rpm files).
# It's exactly the same as the default build above, except:
Expand Down Expand Up @@ -260,28 +236,48 @@ release:
# - glob: ./glob/foo/to/bar/file/foobar/override_from_previous

blobs:
- provider: s3
- &S3_VERSIONED
provider: s3
disable: 'false'
ids:
- s3-versioned
- default
bucket: '{{ .Env.AWS_S3_BUCKET }}'
region: us-east-1
region: '{{ .Env.AWS_S3_REGION }}'
directory: '/'
acl: public-read
extra_files:
- glob: ./dist/s3-versioned_*/**
- glob: ./dist/default_darwin_amd64_v1/bin/step
name_template: step_{{ .Version }}_darwin_amd64
- glob: ./dist/default_darwin_arm64/bin/step
name_template: step_{{ .Version }}_darwin_arm64
- glob: ./dist/default_linux_amd64_v1/bin/step
name_template: step_{{ .Version }}_linux_amd64
- glob: ./dist/default_linux_arm64/bin/step
name_template: step_{{ .Version }}_linux_arm64
- glob: ./dist/default_windows_arm64/bin/step.exe
name_template: step_{{ .Version }}_windows_amd64.exe
- glob: ./dist/default_freebsd_*/bin/step
name_template: step_{{ .Version }}_freebsd_amd64
extra_files_only: true

- provider: s3
# Unversioned (`latest`) copies of binaries.
# This section should only run on full releases (not prereleases).
-
<< : *S3_VERSIONED
disable: '{{ if .Prerelease }}true{{ else }}false{{ end }}'
ids:
- s3-unversioned
bucket: '{{ .Env.AWS_S3_BUCKET }}'
region: us-east-1
directory: '/'
acl: public-read
extra_files:
- glob: ./dist/s3-unversioned_*/**
- glob: ./dist/default_darwin_amd64_v1/bin/step
name_template: step_latest_darwin_amd64
- glob: ./dist/default_darwin_arm64/bin/step
name_template: step_latest_darwin_arm64
- glob: ./dist/default_linux_amd64_v1/bin/step
name_template: step_latest_linux_amd64
- glob: ./dist/default_linux_arm64/bin/step
name_template: step_latest_linux_arm64
- glob: ./dist/default_windows_arm64/bin/step.exe
name_template: step_latest_windows_amd64.exe
- glob: ./dist/default_freebsd_*/bin/step
name_template: step_latest_freebsd_amd64
extra_files_only: true

winget:
Expand Down
Loading