Code Issues Pull Requests Actions Packages Projects Releases 15 Wiki Activity Security Code Quality
3 Commits
2 changed files with 25 additions and 1 deletions

No files matched your search

+12
View File
@@ -46,9 +46,21 @@ jobs:
env:
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
uses: softprops/action-gh-release@v3
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: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
body_path: release-notes.md
# token: ${{ env.RELEASE_TOKEN }} # Use this token if you want user author is 'github-actions' bot
@@ -21,11 +21,23 @@ jobs:
output-file: sbom.json
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
uses: DependencyTrack/gh-upload-sbom@v4
with:
server-hostname: "${{ vars.DT_HOSTNAME }}"
api-key: "${{ DT_API_KEY }}"
api-key: ${{ env.DT_API_KEY }}
project-name: "${{ github.repository }}"
project-version: "latest"
bom-filename: "sbom.json"