Skip to content

5.4.0

5.4.0 #11

Workflow file for this run

# This workflow is responsible to build and publish a release build
# It triggers once a new GitHub Release is published
name: Publish CI
on:
release:
types:
- released
workflow_dispatch:
permissions: { }
jobs:
read-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.parse.outputs.version }}
steps:
- name: Assert ref type
run: |-
if [[ "$GITHUB_REF_TYPE" != "tag" ]]; then
echo "::error::Publishing is only supported for tags!"
exit 1
fi
- name: Checkout Repository
uses: actions/[email protected]
- name: Parse Version from POM
id: parse
run: |-
VERSION=`yq -p=xml '.project.version' pom.xml`
echo "version=${VERSION}" >> $GITHUB_OUTPUT
call-build:
needs:
- read-version
uses: ./.github/workflows/_meta-build.yaml
with:
app-version: ${{ needs.read-version.outputs.version }}
publish-container: true
permissions:
packages: write # Required to push images to ghcr.io
security-events: write # Required to upload trivy's SARIF output
secrets:
registry-0-usr: ${{ github.repository_owner }}
registry-0-psw: ${{ secrets.GITHUB_TOKEN }}
update-github-release:
runs-on: ubuntu-latest
needs:
- read-version
- call-build
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Download Artifacts
uses: actions/[email protected]
with:
name: assembled-wars
path: target
- name: Create Checksums and SBOM
run: |-
pushd target
echo "# SHA1" >> checksums.txt
sha1sum dependency-track-apiserver.jar >> checksums.txt
echo "# SHA256" >> checksums.txt
sha256sum dependency-track-apiserver.jar >> checksums.txt
echo "# SHA512" >> checksums.txt
sha512sum dependency-track-apiserver.jar >> checksums.txt
popd
- name: Update Release
env:
GITHUB_TOKEN: ${{ secrets.BOT_RELEASE_TOKEN }}
run: |-
gh release upload ${{ needs.read-version.outputs.version }} \
--clobber \
target/dependency-track-apiserver.jar \
target/checksums.txt \
target/bom.json