Skip to content

Commit

Permalink
add archives with jdk as assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Walid Lezzar committed Mar 25, 2020
1 parent 2b32e2a commit f190d1e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 4 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/upload-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,48 @@ jobs:
asset_path: ${{ steps.package.outputs.package_path }}
asset_name: ${{ steps.package.outputs.package_name }}
asset_content_type: application/zip

release-archives-with-jdk:

name: Publish packages with JDK

strategy:
matrix:
os:
- "ubuntu-latest"
- "macos-latest"

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: set upload url
id: fetch_release_data
run: |
UPLOAD_URL=$(jq -r '.release.upload_url' ${GITHUB_EVENT_PATH})
echo "::set-output name=upload_url::$UPLOAD_URL"
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 14
java-package: jdk
architecture: x64

- name: Package
id: package
run: |
package=$(./dev/scripts/build-zoe-cli-archive-with-jdk.sh)
echo "::set-output name=package_path::${package}"
echo "::set-output name=package_name::$(basename ${package})"
- name: Upload package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.fetch_release_data.outputs.upload_url }}
asset_path: ${{ steps.package.outputs.package_path }}
asset_name: ${{ steps.package.outputs.package_name }}
asset_content_type: application/zip
4 changes: 2 additions & 2 deletions dev/scripts/build-zoe-cli-archive-with-jdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

set -ex

package_dir=$(mktemp -d --suffix "_zoe")
package_dir=$(mktemp -d)
./gradlew zoe-cli:zipJpackageImage \
-PzipJpackageImage.outputDir="${package_dir}" \
-PzipJpackageImage.suffix="_$(arch)" >&2
-PzipJpackageImage.suffix="_$(uname -s)" >&2

package=$(find "${package_dir}" -maxdepth 1 -name 'zoe*.zip')

Expand Down
2 changes: 1 addition & 1 deletion dev/scripts/build-zoe-cli-archive-without-jdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [[ -z "$archive_type" ]]; then
fi

# build distribution
package_dir=$(mktemp -d --suffix "_zoe")
package_dir=$(mktemp -d)
./gradlew zoe-cli:"${archive_type}DistWithoutJdk" -PdistWithoutJdk.outputDir="${package_dir}" >&2

package=$(find "${package_dir}" -maxdepth 1 -name 'zoe*.'${archive_type})
Expand Down
2 changes: 1 addition & 1 deletion dev/scripts/build-zoe-cli-installer-with-jdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [[ -z "$installer_type" ]]; then
exit 1
fi

package_dir=$(mktemp -d --suffix "_zoe")
package_dir=$(mktemp -d)
./gradlew zoe-cli:jpackage -Pjpackage.output="${package_dir}" -Pjpackage.installerType="${installer_type}" >&2

package=$(find "${package_dir}" -maxdepth 1 -name 'zoe*.'${installer_type})
Expand Down

0 comments on commit f190d1e

Please sign in to comment.