more test cases #2069
Workflow file for this run
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: Build | |
on: | |
workflow_call: | |
inputs: | |
branch: | |
type: string | |
required: false | |
description: Reference or branch to build | |
outputs: | |
uber-jar: | |
description: Generated jar | |
value: ${{ jobs.build.outputs.uber-jar }} | |
sources-jar: | |
description: Jar that contains only the source code | |
value: ${{ jobs.build.outputs.sources-jar }} | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.project-version.outputs.PROJECT_VERSION }} | |
uber-jar: firebolt-jdbc-${{ steps.project-version.outputs.PROJECT_VERSION }}.jar | |
sources-jar: firebolt-jdbc-${{ steps.project-version.outputs.PROJECT_VERSION }}-sources.jar | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.branch }} | |
- name: Prepare java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Gradle version | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: --version | |
- name: Build and test | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build --scan | |
- name: Get project version | |
id: project-version | |
run: | | |
echo "PROJECT_VERSION=$(./gradlew printVersion |grep 'PROJECT_VERSION=' | cut -d= -f2)" >> $GITHUB_OUTPUT | |
- name: Upload uber-jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firebolt-jdbc-${{ steps.project-version.outputs.PROJECT_VERSION }}.jar | |
path: build/libs/firebolt-jdbc-${{ steps.project-version.outputs.PROJECT_VERSION }}.jar | |
- name: Upload sources-jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firebolt-jdbc-${{ steps.project-version.outputs.PROJECT_VERSION }}-sources.jar | |
path: build/libs/firebolt-jdbc-${{ steps.project-version.outputs.PROJECT_VERSION }}-sources.jar |