Release Droid - Upload GitHub Release Assets #15
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
name: Release Droid - Upload GitHub Release Assets | |
on: | |
workflow_dispatch: | |
inputs: | |
upload_url: | |
description: "Assets upload URL" | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
profile: [ '-Pspark3.4', '-Pspark3.4-scala2.12', '-Pspark3.3', '-Pspark3.3-scala2.12' ] | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDKs | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: | | |
11 | |
17 | |
cache: "maven" | |
- name: Build with Maven skipping tests | |
run: mvn --batch-mode clean verify ${{ matrix.profile }} -DskipTests | |
- name: Generate sha256sum files | |
run: find */target -maxdepth 1 -name \*.jar -exec bash -c 'sha256sum {} > {}.sha256' \; | |
- name: Upload assets to the GitHub release draft | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.inputs.upload_url }} | |
asset_path: "**/target/*.jar" | |
- name: Upload sha256sum files | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.inputs.upload_url }} | |
asset_path: "**/target/*.sha256" | |
- name: Create a zip file from error code report JSON files | |
run: zip -v error_code_report.zip */target/error_code_report.json | |
- name: Upload error-code-report | |
if: ${{ matrix.profile == '-Pspark3.4' }} | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.inputs.upload_url }} | |
asset_path: error_code_report.zip |