Skip to content

Merge pull request #3 from GreptimeTeam/fix/statement-error #15

Merge pull request #3 from GreptimeTeam/fix/statement-error

Merge pull request #3 from GreptimeTeam/fix/statement-error #15

name: Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout driver
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/driver
- name: checkout metabase
uses: actions/checkout@v4
with:
repository: metabase/metabase
path: ${{ github.workspace }}/metabase
ref: release-x.50.x
- name: install java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: 'latest'
- name: Build project
run: |
export DRIVER_PATH=${{ github.workspace }}/driver
cd ${{ github.workspace }}/metabase
clojure \
-Sdeps "{:aliases {:greptimedb {:extra-deps {com.metabase/greptimedb-driver {:local/root \"$DRIVER_PATH\"}}}}}" \
-X:build:greptimedb \
build-drivers.build-driver/build-driver! \
"{:driver :greptimedb, :project-dir \"$DRIVER_PATH\", :target-dir \"$DRIVER_PATH/target\"}"
- name: Release with Notes
uses: softprops/action-gh-release@v2
with:
files: ${{ github.workspace }}/driver/target/greptimedb.metabase-driver.jar
generate_release_notes: true
prerelease: false
token: ${{ secrets.PAT }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ github.workspace }}/driver
file: ${{ github.workspace }}/driver/docker/Dockerfile
push: true
platforms: linux/amd64
tags: |
greptime/metabase-greptimedb:${{ github.ref_name }}-mb050
greptime/metabase-greptimedb:latest