Skip to content

Release Droid - Upload GitHub Release Assets #8

Release Droid - Upload GitHub Release Assets

Release Droid - Upload GitHub Release Assets #8

name: Release Droid - Upload GitHub Release Assets
on:
workflow_dispatch:
inputs:
upload_url:
description: 'Assets upload URL'
required: true
jobs:
build:
runs-on: ubuntu-latest
env:
METABASE_TAG: v0.48.0
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 1
path: metabase-driver
- name: Checkout the Metabase repository at tag ${{ env.METABASE_TAG }}
uses: actions/checkout@v4
with:
fetch-depth: 1
repository: metabase/metabase
path: metabase
ref: ${{ env.METABASE_TAG }}
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@12.1
with:
cli: '1.11.1.1262'
- name: Cache Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('metabase-driver/deps.edn', 'metabase/**/deps.edn') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Log versions
run: |
java --version
echo Clojure: $(clojure -M --eval "(clojure-version)")
clojure --version
- name: Build driver
run: "$GITHUB_WORKSPACE/metabase-driver/scripts/build.sh"
- name: Generate sha256sum files
run: |
cd "$GITHUB_WORKSPACE/metabase-driver/target"
find . -maxdepth 1 -name "*.jar" -exec bash -c 'sha256sum {} > {}.sha256' \;
- name: Upload driver
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: metabase-driver/target/*.jar
- name: Upload sha256sum files
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: metabase-driver/target/*.sha256