Skip to content

Commit

Permalink
embed build into release
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch committed Oct 22, 2024
1 parent ef5acf0 commit 764f3df
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,47 @@ on:
default: 'v0.48.0'

jobs:
build-driver:
uses: ./.github/workflows/build-driver.yml
with:
metabase-version: ${{ github.event.inputs.metabase-version || 'v0.48.0' }}
branch: ${{ github.event.release.tag_name || github.event.inputs.tag_name }}
publish:
runs-on: ubuntu-latest
needs: [build-driver]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.tag_name || github.event.inputs.tag_name || 'develop' }}

- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
lein: '2.9.10'

- name: "Download metabase"
run: wget https://downloads.metabase.com/${{ github.event.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: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
id: import_gpg
with:
gpg_private_key: ${{ secrets.GRADLE_SIGNING_KEY }}
passphrase: ${{ secrets.GRADLE_SIGNING_PASSWORD }}

- name: "Maven deploy"
env:
SIGN_KEY_ID: ${{ steps.import_gpg.outputs.keyid }}
MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }}
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
run: |
lein deploy
echo "version=$(lein project-version | tail -1)" >> "${GITHUB_OUTPUT}"
echo "jar-name=$(lein file-name | tail -1)" >> "${GITHUB_OUTPUT}"
- uses: xresloader/upload-to-github-release@v1
env:
Expand All @@ -45,3 +64,9 @@ jobs:
file: ${{ needs.build-driver.outputs.jar-name }}
tags: true
draft: false

- name: Upload resulting jar file as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.package.outputs.jar-name }}
path: target/uberjar/${{ steps.package.outputs.jar-name }}

0 comments on commit 764f3df

Please sign in to comment.