Skip to content

Commit e207f94

Browse files
committed
Merge branch 'master' into fix-1637
2 parents 4616c58 + 07a000e commit e207f94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1670
-1000
lines changed

.github/workflows/actionlint.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Lint GitHub Actions workflows
2+
on:
3+
push:
4+
workflow_call:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
actionlint:
16+
uses: smallstep/workflows/.github/workflows/actionlint.yml@main
17+
secrets: inherit

.github/workflows/dependabot-auto-merge.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@ permissions:
66
pull-requests: write
77

88
jobs:
9-
dependabot:
10-
runs-on: ubuntu-latest
11-
if: ${{ github.actor == 'dependabot[bot]' }}
12-
steps:
13-
- name: Dependabot metadata
14-
id: metadata
15-
uses: dependabot/[email protected]
16-
with:
17-
github-token: "${{ secrets.GITHUB_TOKEN }}"
18-
- name: Enable auto-merge for Dependabot PRs
19-
run: gh pr merge --auto --merge "$PR_URL"
20-
env:
21-
PR_URL: ${{github.event.pull_request.html_url}}
22-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
9+
dependabot-auto-merge:
10+
uses: smallstep/workflows/.github/workflows/dependabot-auto-merge.yml@main
11+
secrets: inherit

.github/workflows/release.yml

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ jobs:
5353
echo "DOCKER_TAGS_DEBIAN=${{ env.DOCKER_TAGS_DEBIAN }},${{ env.DOCKER_IMAGE }}:${DEBIAN_TAG}" >> "${GITHUB_ENV}"
5454
- name: Create Release
5555
id: create_release
56-
uses: actions/create-release@v1
56+
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
5757
env:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5959
with:
60-
tag_name: ${{ github.ref }}
61-
release_name: Release ${{ github.ref }}
60+
tag_name: ${{ github.ref_name }}
61+
name: Release ${{ github.ref_name }}
6262
draft: false
6363
prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
6464

@@ -100,69 +100,30 @@ jobs:
100100

101101
# All jobs below this are for full releases (non release candidates e.g. *-rc.*)
102102

103-
build_upload_aws_s3_binaries:
104-
name: Build & Upload AWS S3 Binaries
105-
runs-on: ubuntu-latest
106-
needs: create_release
107-
if: needs.create_release.outputs.is_prerelease == 'false'
108-
steps:
109-
- name: Checkout
110-
uses: actions/checkout@v4
111-
- name: Setup Go
112-
uses: actions/setup-go@v5
113-
with:
114-
go-version: 'stable'
115-
check-latest: true
116-
- name: Build
117-
id: build
118-
run: |
119-
PATH=$PATH:/usr/local/go/bin:/home/admin/go/bin
120-
make -j1 binary-linux-amd64 binary-linux-arm64 binary-darwin-amd64 binary-windows-amd64
121-
mkdir -p ./.releases
122-
cp ./output/binary/linux-amd64/bin/step ./.releases/step_${{ needs.create_release.outputs.version }}_linux_amd64
123-
cp ./output/binary/linux-amd64/bin/step ./.releases/step_latest_linux_amd64
124-
cp ./output/binary/linux-arm64/bin/step ./.releases/step_${{ needs.create_release.outputs.version }}_linux_arm64
125-
cp ./output/binary/linux-arm64/bin/step ./.releases/step_latest_linux_arm64
126-
cp ./output/binary/darwin-amd64/bin/step ./.releases/step_${{ needs.create_release.outputs.version }}_darwin_amd64
127-
cp ./output/binary/darwin-amd64/bin/step ./.releases/step_latest_darwin_amd64
128-
cp ./output/binary/windows-amd64/bin/step ./.releases/step_${{ needs.create_release.outputs.version }}_windows.exe
129-
cp ./output/binary/windows-amd64/bin/step ./.releases/step_latest_windows.exe
130-
- name: Upload s3
131-
id: upload-s3
132-
uses: jakejarvis/[email protected]
133-
with:
134-
args: --acl public-read --follow-symlinks
135-
env:
136-
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
137-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
138-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
139-
AWS_REGION: us-east-1
140-
SOURCE_DIR: ./.releases
141-
142103
update_reference_docs:
143104
name: Update Reference Docs
144105
runs-on: ubuntu-latest
145106
needs: create_release
146107
if: needs.create_release.outputs.is_prerelease == 'false'
147108
steps:
148109
- name: Checkout
149-
uses: actions/checkout@v4
110+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
150111
- name: Setup Go
151-
uses: actions/setup-go@v5
112+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
152113
with:
153114
go-version: 'stable'
154115
check-latest: true
155116
- name: Build
156117
id: build
157118
run: V=1 make build
158119
- name: Checkout Docs
159-
uses: actions/checkout@v4
120+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
160121
with:
161122
repository: smallstep/docs
162123
token: ${{ secrets.DOCS_PAT }}
163124
path: './docs'
164125
- name: Setup bot SSH signing key
165-
uses: webfactory/ssh-agent@v0.8.0
126+
uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
166127
env:
167128
HAS_SSH_PRIVATE_KEY: ${{ secrets.STEP_TRAVIS_CI_GH_PRIVATE_SIGNING_KEY != '' }}
168129
if: ${{ env.HAS_SSH_PRIVATE_KEY == 'true' }}
@@ -207,7 +168,7 @@ jobs:
207168
208169
git add . && git commit -a -m "step-cli ${{ needs.create_release.outputs.vversion }} reference update"
209170
- name: Push changes
210-
uses: ad-m/[email protected]
171+
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # v0.8.0
211172
with:
212173
github_token: ${{ secrets.DOCS_PAT }}
213174
branch: 'main'

.goreleaser.yml

Lines changed: 80 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
# This is an example .goreleaser.yml file with some sane defaults.
2-
# Make sure to check the documentation at http://goreleaser.com
1+
# Documentation: https://goreleaser.com/customization/
2+
version: 2
33
project_name: step
44

55
before:
66
hooks:
7-
# You may remove this if you don't use go modules.
87
- go mod download
9-
# - go generate ./...
108

119
builds:
12-
-
13-
id: default
10+
- &COMMON
1411
env:
1512
- CGO_ENABLED=0
13+
main: ./cmd/step/main.go
14+
flags:
15+
- -trimpath
16+
ldflags:
17+
- -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}}
18+
-
19+
<< : *COMMON
20+
id: default
1621
targets:
1722
- darwin_amd64
1823
- darwin_arm64
@@ -28,31 +33,48 @@ builds:
2833
- linux_ppc64le
2934
- windows_amd64
3035
- windows_arm64
31-
flags:
32-
- -trimpath
33-
main: ./cmd/step/main.go
3436
binary: bin/step
35-
ldflags:
36-
- -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}}
37+
-
38+
<< : *COMMON
39+
id: debug
40+
gcflags: all=-N -l
41+
-
42+
# This build is for S3 binaries that follow our naming convention there.
43+
<< : *COMMON
44+
id: s3-versioned
45+
targets:
46+
- darwin_amd64
47+
- darwin_arm64
48+
- linux_amd64
49+
- linux_arm64
50+
- windows_amd64
51+
- freebsd_amd64
52+
binary: 'step_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
53+
-
54+
# This build is for S3 unversioned binaries that follow our naming convention there.
55+
<< : *COMMON
56+
id: s3-unversioned
57+
targets:
58+
- darwin_amd64
59+
- darwin_arm64
60+
- linux_amd64
61+
- linux_arm64
62+
- windows_amd64
63+
- freebsd_amd64
64+
binary: 'step_latest_{{ .Os }}_{{ .Arch }}'
3765
-
3866
# This build is specifically for nFPM targets (.deb and .rpm files).
3967
# It's exactly the same as the default build above, except:
4068
# - it only builds the archs we want to produce .deb and .rpm files for
4169
# - the name of the output binary is step-cli
70+
<< : *COMMON
4271
id: nfpm
43-
env:
44-
- CGO_ENABLED=0
4572
goos:
4673
- linux
4774
goarch:
4875
- amd64
4976
- arm64
50-
flags:
51-
- -trimpath
52-
main: ./cmd/step/main.go
5377
binary: step-cli
54-
ldflags:
55-
- -w -X main.Version={{.Version}} -X main.BuildTime={{.Date}}
5678

5779
archives:
5880
- &ARCHIVE
@@ -135,7 +157,7 @@ signs:
135157
- cmd: cosign
136158
signature: "${artifact}.sig"
137159
certificate: "${artifact}.pem"
138-
args: ["sign-blob", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output-certificate=${certificate}", "--output-signature=${signature}", "${artifact}"]
160+
args: ["sign-blob", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output-certificate=${certificate}", "--output-signature=${signature}", "${artifact}", "--yes"]
139161
artifacts: all
140162

141163
snapshot:
@@ -174,11 +196,20 @@ release:
174196
header: |
175197
## Official Release Artifacts
176198
199+
Below are the most popular artifacts for `step` on each platform.
200+
201+
For packaged versions (Homebrew, Scoop, etc.), see our [installation docs](https://smallstep.com/docs/step-cli/installation).
202+
177203
#### Linux
178204
179205
- 📦 [step_linux_{{ .Version }}_amd64.tar.gz](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step_linux_{{ .Version }}_amd64.tar.gz)
206+
- 📦 [step_linux_{{ .Version }}_arm64.tar.gz](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step_linux_{{ .Version }}_arm64.tar.gz)
207+
- 📦 [step_linux_{{ .Version }}_armv7.tar.gz](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step_linux_{{ .Version }}_armv7.tar.gz)
180208
- 📦 [step-cli_{{ .Version }}_amd64.deb](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step-cli_{{ .Version }}_amd64.deb)
181209
- 📦 [step-cli_{{ .Version }}_amd64.rpm](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step-cli_{{ .Version }}_amd64.rpm)
210+
- 📦 [step-cli_{{ .Version }}_arm64.deb](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step-cli_{{ .Version }}_arm64.deb)
211+
- 📦 [step-cli_{{ .Version }}_arm64.rpm](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step-cli_{{ .Version }}_arm64.rpm)
212+
- see `Assets` below for more builds
182213
183214
#### macOS Darwin
184215
@@ -188,12 +219,8 @@ release:
188219
#### Windows
189220
190221
- 📦 [step_windows_{{ .Version }}_amd64.zip](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step_windows_{{ .Version }}_amd64.zip)
222+
- 📦 [step_windows_{{ .Version }}_arm64.zip](https://dl.smallstep.com/gh-release/cli/gh-release-header/{{ .Tag }}/step_windows_{{ .Version }}_arm64.zip)
191223
192-
For more builds across platforms and architectures see the `Assets` section below.
193-
And for packaged versions (Homebrew, Scoop, etc.), see our [installation docs](https://smallstep.com/docs/step-cli/installation).
194-
195-
196-
Don't see the artifact you need? Open an issue [here](https://github.com/smallstep/cli/issues/new/choose).
197224
198225
## Signatures and Checksums
199226
@@ -219,7 +246,7 @@ release:
219246
220247
Those were the changes on {{ .Tag }}!
221248
222-
Come join us on [Discord](https://discord.gg/X2RKGwEbV9) to ask questions, chat about PKI, or get a sneak peak at the freshest PKI memes.
249+
Come join us on [Discord](https://discord.gg/X2RKGwEbV9) to ask questions, chat about PKI, or get a sneak peek at the freshest PKI memes.
223250
224251
# You can disable this pipe in order to not upload any artifacts.
225252
# Defaults to false.
@@ -234,8 +261,33 @@ release:
234261
# - glob: ./glob/**/to/**/file/**/*
235262
# - glob: ./glob/foo/to/bar/file/foobar/override_from_previous
236263

264+
blobs:
265+
- provider: s3
266+
disable: 'false'
267+
ids:
268+
- s3-versioned
269+
bucket: '{{ .Env.AWS_S3_BUCKET }}'
270+
region: us-east-1
271+
directory: '/'
272+
acl: public-read
273+
extra_files:
274+
- glob: ./dist/s3-versioned_*/**
275+
extra_files_only: true
276+
277+
- provider: s3
278+
disable: '{{ if .Prerelease }}true{{ else }}false{{ end }}'
279+
ids:
280+
- s3-unversioned
281+
bucket: '{{ .Env.AWS_S3_BUCKET }}'
282+
region: us-east-1
283+
directory: '/'
284+
acl: public-read
285+
extra_files:
286+
- glob: ./dist/s3-unversioned_*/**
287+
extra_files_only: true
288+
237289
winget:
238-
-
290+
-
239291
# IDs of the archives to use.
240292
# Empty means all IDs.
241293
ids: [ default ]
@@ -305,7 +357,7 @@ winget:
305357
# Release notes URL.
306358
#
307359
# Templates: allowed
308-
release_notes_url: "https://github.com/smallstep/cli/releases/tag/{{.Version}}"
360+
release_notes_url: "https://github.com/smallstep/cli/releases/tag/{{ .Tag }}"
309361

310362
# Create the PR - for testing
311363
skip_upload: auto
@@ -319,7 +371,7 @@ winget:
319371
repository:
320372
owner: smallstep
321373
name: winget-pkgs
322-
branch: step
374+
branch: "step-{{.Version}}"
323375

324376
# Optionally a token can be provided, if it differs from the token
325377
# provided to GoReleaser

0 commit comments

Comments
 (0)