name: Create SBOM document and upload as release asset

on:
  release:
    types:
      - published

jobs:
  publish-sbom:
    runs-on: ubuntu-latest
    steps:
      - name: Check out
        uses: actions/checkout@v3

      - name: Set up Go environment
        uses: actions/setup-go@v4

      - name: Generate CycloneDX SBOM document
        uses: ./.github/actions/sbom-generator-cyclonedx-golang
        with:
          repo_token: ${{ secrets.BOT_TOKEN }}
