From 3234c92da19c86257a86c8e19c4da43791ecaed7 Mon Sep 17 00:00:00 2001 From: vakarisbk Date: Wed, 8 Nov 2023 00:21:35 +0200 Subject: [PATCH] added maven package build --- .github/workflows/publish-maven-package.yml | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/publish-maven-package.yml diff --git a/.github/workflows/publish-maven-package.yml b/.github/workflows/publish-maven-package.yml new file mode 100644 index 000000000..81333be45 --- /dev/null +++ b/.github/workflows/publish-maven-package.yml @@ -0,0 +1,42 @@ +name: Publish Maven Package + +on: + workflow_dispatch: + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v2 + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + + - name: Build with Maven + run: mvn clean package -B -V -e -Pspark3 -Pscala-2.12 -Phadoop3 -DskipTests -T1C + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.event.inputs.version }} + release_name: ${{ github.event.inputs.release_name }} + draft: ${{ github.event.inputs.is_draft }} + prerelease: ${{ github.event.inputs.is_prerelease }} + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./assembly/target/*.zip + asset_name: livy-0.9-snapshot.zip + asset_content_type: application/zip \ No newline at end of file