This action is designed to run when a repository gets tagged. It uses
publish-release github
to create a new release on GitHub. The action can upload assets to the
releases page and automatically create an SBOM.
Please note that publish-release
uses the Kubernetes release tooling, this
means that it will look for a tag following semantic versioning
(eg v1.2.3).
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # needed to write releases
steps:
- name: Install publish-release
uses: kubernetes-sigs/release-actions/setup-publish-release@main
- name: Publish Release
uses: kubernetes-sigs/release-actions/publish-release@main
with:
assets: "kubernetes.png|starship.toml"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
The following optional inputs:
Input | Description |
---|---|
publish-release-version |
publish-release version to use instead of the default. |
install-dir |
directory to place the bom binary into instead of the default ($HOME/.publish-release ). |
use-sudo |
set to true if install-dir location requires sudo privs. Defaults to false. |
install-only |
set to true if need only install publish-release binary. Defaults to false. |
assets |
Assets to upload to the release page. |
draft |
Mark the release as draft. Defaults to false. |
sbom |
Generate an SBOM from the code. Defaults to true. |
template |
Release template file. |
name |
Name for the release. |