Skip to content

Commit

Permalink
Merge pull request #110 from puerco/release-workflow
Browse files Browse the repository at this point in the history
Add release workflow with SBOM generation
  • Loading branch information
k8s-ci-robot authored Jul 25, 2024
2 parents 943a605 + 9670e44 commit 0790ab4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .bom.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
license: Apache-2.0
name: sigs.k8s.io/release-utils
creator:
person: The Kubernetes Authors
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write # needed to write releases

steps:
- name: Set tag name
shell: bash
run: |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v3
with:
go-version-file: go.mod
check-latest: true
cache: false
- name: Install bom
uses: kubernetes-sigs/release-actions/setup-bom@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0
- name: Generate SBOM
shell: bash
run: |
bom generate -c .bom.yaml --format=json -o /tmp/sigs.k8s.io-release-utils-$TAG.spdx.json .
- name: Publish Release
uses: kubernetes-sigs/release-actions/publish-release@2f8b9ec22aedc9ce15039b6c7716aa6c2907df1c # v0.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
assets: "/tmp/sigs.k8s.io-release-utils-$TAG.spdx.json"
sbom: false

0 comments on commit 0790ab4

Please sign in to comment.