Compare commits
6
Commits
v3.1.0
...
08332b693c
No files matched your search
@@ -3,7 +3,7 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "**"
|
- "v*.*.*"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -46,9 +46,22 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
OUTPUT: release-notes.md
|
OUTPUT: release-notes.md
|
||||||
|
|
||||||
|
- name: Read Release Token from the runner
|
||||||
|
run: |
|
||||||
|
if [[ -z "${RELEASE_TOKEN:-}" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
echo "RELEASE_TOKEN<<__RELEASE_TOKEN__"
|
||||||
|
printf '%s\n' "$RELEASE_TOKEN"
|
||||||
|
echo "__RELEASE_TOKEN__"
|
||||||
|
} >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v3
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
# prerelease only when the tag contains "-alpha", "-beta" or "-rc". ex: v1.0.0-alpha.1, v1.0.0-beta.1, v1.0.0-rc.1
|
# prerelease only when the tag contains "-alpha", "-beta" or "-rc". ex: v1.0.0-alpha.1, v1.0.0-beta.1, v1.0.0-rc.1
|
||||||
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
|
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
|
||||||
body_path: release-notes.md
|
body_path: release-notes.md
|
||||||
|
token: ${{ env.RELEASE_TOKEN }} # Use this token if you want user author is 'github-actions' bot
|
||||||
|
draft: false
|
||||||
@@ -21,11 +21,23 @@ jobs:
|
|||||||
output-file: sbom.json
|
output-file: sbom.json
|
||||||
upload-artifact: false
|
upload-artifact: false
|
||||||
|
|
||||||
|
- name: Read API key from the runner
|
||||||
|
run: |
|
||||||
|
if [[ -z "${DT_API_KEY:-}" ]]; then
|
||||||
|
echo "DT_API_KEY is not set on this runner"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
echo "DT_API_KEY<<__DT_API_KEY__"
|
||||||
|
printf '%s\n' "$DT_API_KEY"
|
||||||
|
echo "__DT_API_KEY__"
|
||||||
|
} >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Upload SBOM to Dependency-Track
|
- name: Upload SBOM to Dependency-Track
|
||||||
uses: DependencyTrack/gh-upload-sbom@v4
|
uses: DependencyTrack/gh-upload-sbom@v4
|
||||||
with:
|
with:
|
||||||
server-hostname: "${{ vars.DT_HOSTNAME }}"
|
server-hostname: "${{ vars.DT_HOSTNAME }}"
|
||||||
api-key: "${{ DT_API_KEY }}"
|
api-key: ${{ env.DT_API_KEY }}
|
||||||
project-name: "${{ github.repository }}"
|
project-name: "${{ github.repository }}"
|
||||||
project-version: "latest"
|
project-version: "latest"
|
||||||
bom-filename: "sbom.json"
|
bom-filename: "sbom.json"
|
||||||
|
|||||||
Reference in new issue
Block a user