Skip to content

Commit

Permalink
Add release-sign.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm committed Feb 14, 2024
1 parent 37ffd05 commit f684ddb
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release-sign.yml
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 openexr-${{ github.ref_name }}.tar.gz ${{ github.ref_name }}

- name: Sign archive with Sigstore
uses: sigstore/[email protected]
with:
inputs: openexr-${{ github.ref_name }}.tar.gz

- name: Get release tag
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload release archive
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: openexr-${{ github.ref_name }}.tar.gz
asset_name: openexr-${{ github.ref_name }}.tar.gz
asset_content_type: application/zip

- name: Upload release sigstore
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: openexr-${{ github.ref_name }}.tar.gz.sigstore
asset_name: openexr-${{ github.ref_name }}.tar.gz.sigstore
asset_content_type: application/zip

0 comments on commit f684ddb

Please sign in to comment.