Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: attach cli artifact to release #38

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/java.publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand All @@ -29,25 +30,11 @@ 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: 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/*
artifactErrorsFailBuild: true
makeLatest: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
- name: Setup java
uses: actions/setup-java@v3
with:
Expand All @@ -64,5 +51,18 @@ jobs:
"username": "${{ secrets.GHPR_USERNAME }}",
"password": "${{ secrets.GHPR_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
with:
allowUpdates: true
artifacts: license-obligations/*,cli-${GITHUB_REF#refs/*/cli-v}.jar
artifactErrorsFailBuild: true
makeLatest: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
- name: Publish version to GitHub Packages
run: mvn deploy -Dskip.tests --batch-mode --no-transfer-progress
Loading