forked from AcademySoftwareFoundation/Imath
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Replicates the openexr workflow: AcademySoftwareFoundation/openexr#1637 Signed-off-by: Cary Phillips <cary@ilm.com>
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 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,57 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright (c) Contributors to the OpenEXR Project. | ||
|
||
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 | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create archive | ||
run: git archive --format=tar.gz -o Imath-${{ github.ref_name }}.tar.gz ${{ github.ref_name }} | ||
|
||
- name: Sign archive with Sigstore | ||
uses: sigstore/gh-action-sigstore-python@v2.1.0 | ||
with: | ||
inputs: Imath-${{ github.ref_name }}.tar.gz | ||
|
||
- name: Get release tag | ||
id: get_release | ||
uses: bruceadams/get-release@v1.3.2 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Upload release archive | ||
uses: actions/upload-release-asset@v1.0.2 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: Imath-${{ github.ref_name }}.tar.gz | ||
asset_name: Imath-${{ github.ref_name }}.tar.gz | ||
asset_content_type: application/zip | ||
|
||
- name: Upload release sigstore | ||
uses: actions/upload-release-asset@v1.0.2 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: Imath-${{ github.ref_name }}.tar.gz.sigstore | ||
asset_name: Imath-${{ github.ref_name }}.tar.gz.sigstore | ||
asset_content_type: application/zip |