-
Notifications
You must be signed in to change notification settings - Fork 249
39 lines (36 loc) · 1.05 KB
/
release-attestation.yml
File metadata and controls
39 lines (36 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Release Attestation
on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: "Release tag to attest"
required: true
type: string
jobs:
attest-release-assets:
runs-on: ubuntu-latest
permissions:
contents: read
attestations: write
id-token: write
steps:
- name: Download release assets
id: download
run: |
set -ex
# Get the release tag from input or event
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
RELEASE_TAG="${{ github.event.inputs.release_tag }}"
else
RELEASE_TAG="${{ github.event.release.tag_name }}"
fi
echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
gh release download -R microsoft/ccf $RELEASE_TAG -D release-assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attest release assets
uses: actions/attest-build-provenance@v2
with:
subject-path: "release-assets/*"