-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sebastian Becker <[email protected]>
- Loading branch information
Showing
1 changed file
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ jobs: | |
- name: Retrieve license obligation resources | ||
id: license-obligations | ||
run: | | ||
mkdir -p license-obligations | ||
cd 3RD-PARTY-LICENSES | ||
FILES=$(find . -maxdepth 1 -type d -not -path .) | ||
if [ -n "$FILES" ] | ||
|
@@ -29,21 +30,36 @@ jobs: | |
split($0,b,"/"); \ | ||
system("xargs < " $0 " curl --create-dirs -Lo ./sources/" b[2] ".zip " $2)}' && \ | ||
find -regex './sources$' | awk '{system("zip -jr ./3rd-party-sources.zip " $0)}' | ||
mkdir -p ../license-obligations | ||
ARCHIVES=$(find . -regex "^./3rd-party-.*.zip$") | ||
OBLIGATIONS_FOUND="false" | ||
if [ -n "$ARCHIVES" ] | ||
then | ||
mv $(echo "${ARCHIVES}") ../license-obligations/ | ||
OBLIGATIONS_FOUND="true" | ||
fi | ||
echo "OBLIGATIONS_FOUND=${OBLIGATIONS_FOUND}" >> $GITHUB_OUTPUT | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
- name: Setting up Github Package Repository as Maven Repository | ||
uses: s4u/[email protected] | ||
with: | ||
githubServer: false | ||
servers: | | ||
[{ | ||
"id": "github", | ||
"username": "${{ github.actor }}", | ||
"password": "${{ secrets.GITHUB_TOKEN }}" | ||
}] | ||
- name: Build artifact | ||
run: | | ||
mvn package -Dskip.tests --batch-mode --no-transfer-progress && | ||
cp target/cli-${GITHUB_REF#refs/*/cli-v}-jar-with-dependencies.jar cli-${GITHUB_REF#refs/*/cli-v}.jar | ||
- name: Update Release with license obligations resources | ||
uses: ncipollo/release-action@v1 | ||
if: steps.license-obligations.outputs.OBLIGATIONS_FOUND == 'true' | ||
with: | ||
allowUpdates: true | ||
artifacts: license-obligations/* | ||
artifacts: license-obligations/*,cli-${GITHUB_REF#refs/*/cli-v}.jar | ||
artifactErrorsFailBuild: true | ||
makeLatest: true | ||
omitBodyDuringUpdate: true | ||
|