-
Notifications
You must be signed in to change notification settings - Fork 482
Add release signing workflow using Sigstore #2229
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
Open
pmady
wants to merge
1
commit into
AcademySoftwareFoundation:main
Choose a base branch
from
pmady:feature/release-signing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,67 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # Copyright Contributors to the OpenColorIO 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 OpenColorIO 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/OpenColorIO/.github/workflows/release-sign.yml@refs/tags/<tag> OpenColorIO-<tag>.tar.gz | ||
| # | ||
|
|
||
| name: Sign Release | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Sign & upload release artifacts | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| TAG: ${{ github.ref_name }} | ||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| repository-projects: write | ||
|
|
||
| steps: | ||
|
|
||
| - name: Set Prefix | ||
| # The tag name begins with a 'v', e.g. "v2.4.0", but the prefix | ||
| # should omit the 'v', so the tarball "OpenColorIO-2.4.0.tar.gz" | ||
| # extracts files into "OpenColorIO-2.4.0/...". This matches | ||
| # the GitHub release page autogenerated artifact conventions. | ||
| run: | | ||
| echo OCIO_PREFIX=OpenColorIO-${TAG//v}/ >> $GITHUB_ENV | ||
| echo OCIO_TARBALL=OpenColorIO-${TAG//v}.tar.gz >> $GITHUB_ENV | ||
| shell: bash | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Create archive | ||
| run: git archive --format=tar.gz -o ${OCIO_TARBALL} --prefix ${OCIO_PREFIX} ${TAG} | ||
|
|
||
| - name: Sign archive with Sigstore | ||
| uses: sigstore/gh-action-sigstore-python@a5caf349bc536fbef3668a10ed7f5cd309a4b53d # v3.2.0 | ||
| with: | ||
| inputs: ${{ env.OCIO_TARBALL }} | ||
| upload-signing-artifacts: false | ||
| release-signing-artifacts: false | ||
|
|
||
| - name: Upload release archive | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: gh release upload ${TAG} ${OCIO_TARBALL} ${OCIO_TARBALL}.sigstore.json | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice that the OpenEXR version of this is using a more recent checkout action (6.0.1 vs. 4.2.2). Using 4.2.2 is consistent with what we do in our other Actions scripts, so it's fine for this PR. Just wanted to flag it as something that we may want to update and see what breaks if we try to use something more recent on our more recent vfx platform releases that are not subject to the glibc problem.