Repository navigation
71 lines (57 loc) · 2.24 KB
/
Copy pathrelease.yaml
File metadata and controls
71 lines (57 loc) · 2.24 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# SPDX-FileCopyrightText: Copyright 2025 The OpenVEX Authors
# SPDX-License-Identifier: Apache-2.0
name: Release
on:
push:
tags:
- 'v*'
permissions: {}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
- name: Setup bnd
uses: carabiner-dev/actions/install/bnd@63d43b57262e65927864c8f7ca0a6a8efe06acc0 # v1.3.1
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: '1.27'
check-latest: true
cache: false
- name: Install tejolote
uses: kubernetes-sigs/release-actions/setup-tejolote@b5b8280a60e6e20607f77068011269b982c60971 # v0.4.5
- name: Set tag output
id: tag
run: echo "tag_name=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0
id: goreleaser
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Provenance
id: tejolote
env:
GH_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tejolote attest --artifacts github://${{github.repository}}/${{ steps.tag.outputs.tag_name }} github://${{github.repository}}/"${GITHUB_RUN_ID}" --output provenance.json
bnd statement provenance.json -o vexflow-${{ steps.tag.outputs.tag_name }}.provenance.json
gh release upload ${{ steps.tag.outputs.tag_name }} vexflow-${{ steps.tag.outputs.tag_name }}.provenance.json
bnd push ${{github.repository}} vexflow-${{ steps.tag.outputs.tag_name }}.provenance.json
- name: Generate SBOM
id: sbom
uses: carabiner-dev/actions/unpack/sbom@63d43b57262e65927864c8f7ca0a6a8efe06acc0 # v1.3.1
with:
push-to-release: ${{ steps.tag.outputs.tag_name }}
env:
GH_TOKEN: ${{ github.token }}