Skip to content

Commit

Permalink
ci: add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Sep 8, 2024
1 parent d25d869 commit ea662eb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Upload artifact on release
description: build and upload jar files on release
on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout driver
uses: actions/checkout@v4
path: ./driver
- name: checkout metabase
uses: actions/checkout@v4
repository: https://github.com/metabase/metabase.git
path: ./metabase
- 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: ${{ env:GITHUB_WORKSPACE }}/driver/target/greptimedb.metabase-driver.jar
generate_release_notes: true
prerelease: false

0 comments on commit ea662eb

Please sign in to comment.