Skip to content

Commit 23add69

Browse files
authored
Merge pull request #702 from smallstep/max/release-header
[action] add official package links to github release header (via goreleaser)
2 parents 2cce795 + 6d644dd commit 23add69

File tree

3 files changed

+42
-9
lines changed

3 files changed

+42
-9
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,15 @@ jobs:
6262
needs: test
6363
runs-on: ubuntu-20.04
6464
outputs:
65+
debversion: ${{ steps.extract-tag.outputs.DEB_VERSION }}
6566
is_prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
6667
steps:
68+
-
69+
name: Extract Tag Names
70+
id: extract-tag
71+
run: |
72+
DEB_VERSION=$(echo ${GITHUB_REF#refs/tags/v} | sed 's/-/./')
73+
echo "::set-output name=DEB_VERSION::${DEB_VERSION}"
6774
-
6875
name: Is Pre-release
6976
id: is_prerelease
@@ -122,6 +129,12 @@ jobs:
122129
name: Write cosign key to disk
123130
id: write_key
124131
run: echo "${{ secrets.COSIGN_KEY }}" > "/tmp/cosign.key"
132+
-
133+
name: Get Release Date
134+
id: release_date
135+
run: |
136+
RELEASE_DATE=$(date +"%y-%m-%d")
137+
echo "::set-output name=RELEASE_DATE::${RELEASE_DATE}"
125138
-
126139
name: Run GoReleaser
127140
uses: goreleaser/goreleaser-action@5a54d7e660bda43b405e8463261b3d25631ffe86 # v2.7.0
@@ -131,6 +144,8 @@ jobs:
131144
env:
132145
GITHUB_TOKEN: ${{ secrets.PAT }}
133146
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
147+
DEB_VERSION: ${{ needs.create_release.outputs.debversion }}
148+
RELEASE_DATE: ${{ steps.release_date.outputs.RELEASE_DATE }}
134149

135150
build_upload_docker:
136151
name: Build & Upload Docker Images

.goreleaser.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,26 +154,45 @@ release:
154154

155155
# You can change the name of the release.
156156
# Default is `{{.Tag}}`
157-
#name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"
157+
name_template: "Step CA {{ .Tag }} ({{ .Env.RELEASE_DATE }})"
158158

159159
# Header template for the release body.
160160
# Defaults to empty.
161161
header: |
162-
Welcome to this new release!
162+
## Official Release Artifacts
163+
164+
#### Linux
165+
166+
- 📦 [step-ca_linux_{{ .Version }}_amd64.tar.gz](https://dl.step.sm/certificates/{{ .Tag }}/step-ca_linux_{{ .Version }}_amd64.tar.gz)
167+
- 📦 [step-ca_{{ .Env.DEB_VERSION }}_amd64.deb](https://dl.step.sm/certificates/{{ .Tag }}/step-ca_{{ .Env.DEB_VERSION }}_amd64.deb)
168+
169+
#### OSX Darwin
170+
171+
- 📦 [step-ca_darwin_{{ .Version }}_amd64.tar.gz](https://dl.step.sm/certificates/{{ .Tag }}/step-ca_darwin_{{ .Version }}_amd64.tar.gz)
172+
- 📦 [step-ca_darwin_{{ .Version }}_arm64.tar.gz](https://dl.step.sm/certificates/{{ .Tag }}/step-ca_darwin_{{ .Version }}_arm64.tar.gz)
173+
174+
#### Windows
175+
176+
- 📦 [step-ca_windows_{{ .Version }}_arm64.zip](https://dl.step.sm/certificates/{{ .Tag }}/step-ca_windows_{{ .Version }}_amd64.zip)
177+
178+
For more builds across platforms and architectures see the `Assets` section below.
179+
180+
Don't see the artifact you need? Open an issue [here](https://github.com/smallstep/certificates/issues/new/choose).
163181
164182
## Signatures and Checksums
165183
166184
`step-ca` uses [sigstore/cosign](https://github.com/sigstore/cosign) for signing and verifying release artifacts.
167-
Here is an example of how to use `cosign` to verify a release artifact:
185+
186+
Below is an example using `cosign` to verify a release artifact:
168187
169188
```
170189
cosign verify-blob \
171190
-key https://raw.githubusercontent.com/smallstep/certificates/master/cosign.pub \
172-
-signature ~/Downloads/step-ca_darwin_0.17.2_amd64.tar.gz.sig
173-
~/Downloads/step-ca_darwin_0.17.2_amd64.tar.gz
191+
-signature ~/Downloads/step-ca_darwin_{{ .Version }}_amd64.tar.gz.sig
192+
~/Downloads/step-ca_darwin_{{ .Version }}_amd64.tar.gz
174193
```
175194
176-
We use the `checksums.txt` file to store checksums for every artifact in the release.
195+
The `checksums.txt` file (in the `Assets` section below) contains a checksum for every artifact in the release.
177196
178197
# Footer template for the release body.
179198
# Defaults to empty.
@@ -182,8 +201,7 @@ release:
182201
183202
Those were the changes on {{ .Tag }}!
184203
185-
Come join us on [Discord](https://discord.gg/X2RKGwEbV9) to ask questions, chat about PKI,
186-
or get a sneak peak at the freshest PKI memes.
204+
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.
187205
188206
# You can disable this pipe in order to not upload any artifacts.
189207
# Defaults to false.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ PUSHTYPE := branch
6868
endif
6969

7070
VERSION := $(shell echo $(VERSION) | sed 's/^v//')
71-
DEB_VERSION := $(shell echo $(VERSION) | sed 's/-/~/g')
71+
DEB_VERSION := $(shell echo $(VERSION) | sed 's/-/./g')
7272

7373
ifdef V
7474
$(info TRAVIS_TAG is $(TRAVIS_TAG))

0 commit comments

Comments
 (0)