Skip to content

release

release #2

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
tag:
required: true
description: Tag to trigger release
type: string
prerelease:
required: true
description: Whether to release as a prerelease
type: boolean
workflow_call:
inputs:
tag:
type: string
required: true
prerelease:
type: boolean
required: true
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
- name: Checkout Repo
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
ref: refs/tags/${{ inputs.tag }}
- name: Generate SBOM
uses: anchore/sbom-action@78fc58e266e87a38d4194b2137a3d4e9bcaf7ca1 # v0.14.3
with:
artifact-name: sbom-${{ github.event.repository.name }}-${{ inputs.tag }}.spdx.json
output-file: sbom-${{ github.event.repository.name }}-${{ inputs.tag }}.spdx.json
upload-artifact-retention: 7
- name: Create release
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
with:
tag: ${{ inputs.tag }}
skipIfReleaseExists: true
generateReleaseNotes: true
draft: ${{ inputs.prerelease }}
prerelease: ${{ inputs.prerelease }}