From 764f3dfe3ca5a5335926e8c03d11a4307b48221c Mon Sep 17 00:00:00 2001 From: Stepan Burlakov Date: Tue, 22 Oct 2024 14:03:38 +0300 Subject: [PATCH] embed build into release --- .github/workflows/release.yml | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f47bf4b..4c2f62a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,21 +15,37 @@ 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/setup-clojure@3.7 + 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 }} @@ -37,6 +53,9 @@ jobs: 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: @@ -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 }}