Skip to content

Commit

Permalink
feat: sign pulumi binaries with cosign
Browse files Browse the repository at this point in the history
  • Loading branch information
dirien committed Nov 8, 2022
1 parent 2a98a6e commit 5eccb75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
env:
PULUMI_VERSION: ${{ inputs.version }}

permissions:
id-token: write

steps:
- name: "Windows cache workaround"
# https://github.com/actions/cache/issues/752#issuecomment-1222415717
Expand Down Expand Up @@ -80,6 +83,7 @@ jobs:
- name: Setup versioning env vars
run: |
./scripts/versions.sh | tee -a "${GITHUB_ENV}"
- uses: sigstore/cosign-installer@v2
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
Expand Down Expand Up @@ -116,4 +120,5 @@ jobs:
retention-days: 1
path: |
goreleaser/*.tar.gz
goreleaser/*.sig
goreleaser/*.zip
11 changes: 11 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ archives:
strip_parent: true
name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"

signs:
- cmd: cosign
certificate: '${artifact}.pem'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
artifacts: binary
output: true

snapshot:
name_template: "{{ .Version }}-SNAPSHOT"

Expand Down

0 comments on commit 5eccb75

Please sign in to comment.