forked from alepolidori/astproxy
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.01 KB
/
create-release.yml
File metadata and controls
37 lines (35 loc) · 1.01 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
name: Astproxy Release on tags
on:
push:
tags:
- '**'
jobs:
release-module:
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v3'
with:
ref: ${{ github.ref }}
persist-credentials: false
- name: Create Release
run: gh release create ${{ github.ref }} --generate-notes
env:
GH_TOKEN: ${{ github.token }}
- name: Generate SBOM (CycloneDX)
uses: aquasecurity/trivy-action@0.33.1
with:
scan-type: 'fs'
scan-ref: '.'
format: cyclonedx
output: sbom.cdx.json
- name: Get tag name
id: extract_tag
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
env:
GITHUB_REF: ${{ github.ref }}
- name: Attach SBOM to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ steps.extract_tag.outputs.TAG_NAME }}" sbom.cdx.json --clobber