Skip to content

Build Metabase Firebolt Driver #54

Build Metabase Firebolt Driver

Build Metabase Firebolt Driver #54

Workflow file for this run

name: Build Metabase Firebolt Driver
on:
workflow_dispatch:
inputs:
metabase-version:
description: 'Metabase version'
required: false
type: string
default: 'v0.46.1'
workflow_call:
inputs:
metabase-version:
description: 'Metabase version'
required: true
type: string
outputs:
jar-name:
description: Firebolt Driver jar
value: ${{ jobs.build-driver.outputs.jar-name }}
version:
description: Firebolt Driver version
value: ${{ jobs.build-driver.outputs.version }}
jobs:
build-driver:
runs-on: ubuntu-latest
outputs:
jar-name: firebolt.metabase-driver-${{steps.get-version.outputs.version}}.jar
version: ${{steps.get-version.outputs.version}}
steps:
- uses: actions/checkout@v2
- name: "Download metabase"
run: wget https://downloads.metabase.com/${{ inputs.metabase-version }}/metabase.jar
- name: "Maven install"
run: |
mkdir repo
mvn deploy:deploy-file -Durl=file:repo -DgroupId=com.firebolt -DartifactId=metabase-core -Dversion=1.40 -Dpackaging=jar -Dfile=metabase.jar
- name: "Install dependencies"
run: lein deps
- name: "Package into a jar"
run: LEIN_SNAPSHOTS_IN_RELEASE=true DEBUG=1 lein uberjar
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: '1.11.1.1155'
lein: '2.9.10'
- name: Get version
id: get-version
run: |
clojure -e '(-> "./project.clj" slurp read-string (nth 2))'
version=$(clojure -e '(-> "./project.clj" slurp read-string (nth 2))' | tr -d '"')
mv target/uberjar/firebolt.metabase-driver.jar target/uberjar/firebolt.metabase-driver-${version}.jar
echo "version=${version}" >> "${GITHUB_OUTPUT}"
- name: Upload resulting jar file
uses: actions/upload-artifact@v2
with:
name: firebolt.metabase-driver-${{steps.get-version.outputs.version}}.jar
path: target/uberjar/firebolt.metabase-driver-${{steps.get-version.outputs.version}}.jar