forked from AcademySoftwareFoundation/Imath
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to sign release artifacts with Sigstore (AcademySoftware…
…Foundation#369) * Add workflow to sign release artifacts with Sigstore Replicates the openexr workflow: AcademySoftwareFoundation/openexr#1637 Signed-off-by: Cary Phillips <cary@ilm.com> * Use cosign and gh Signed-off-by: Cary Phillips <cary@ilm.com> * Add comment reference to sigstore docs Signed-off-by: Cary Phillips <cary@ilm.com> * Use gh-action-sigstore-python Signed-off-by: Cary Phillips <cary@ilm.com> * Update security policy Signed-off-by: Cary Phillips <cary@ilm.com> --------- Signed-off-by: Cary Phillips <cary@ilm.com>
- Loading branch information
Showing
2 changed files
with
126 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright (c) Contributors to the OpenEXR Project. | ||
|
||
# | ||
# Releases are signed via https://github.com/sigstore/sigstore-python. | ||
# See https://docs.sigstore.dev for information about sigstore. | ||
# | ||
# This action creates a .tar.gz of the complete Imath source tree at | ||
# the given release tag, signs it via sigstore, and uploads the | ||
# .tar.gz and the associated .tar.gz.sigstore credential bundle. | ||
# | ||
# To verify a downloaded release at a given tag: | ||
# | ||
# % pip install sigstore | ||
# % sigstore verify github --cert-identity https://github.com/AcademySoftwareFoundation/Imath/.github/workflows/release-sign.yml@refs/tags/<tag> Imath-<tag>.tar.gz | ||
# | ||
|
||
name: Sign Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
repository-projects: write | ||
|
||
jobs: | ||
release: | ||
name: Sign & upload release artifacts | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
tarball: Imath-${{ github.ref_name }}.tar.gz | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create archive | ||
run: git archive --format=tar.gz -o ${{ env.tarball }} ${{ github.ref_name }} | ||
|
||
- name: Sign archive with Sigstore | ||
uses: sigstore/gh-action-sigstore-python@v2.1.1 | ||
with: | ||
inputs: ${{ env.tarball }} | ||
|
||
- name: Upload release archive | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: gh release upload ${{ github.ref_name }} ${{ env.tarball }} ${{ env.tarball }}.sigstore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters