Skip to content

release

release #28

Workflow file for this run

name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
inputs:
upload_to_maven:
description: 'Upload to Maven'
required: false
default: false
github_release:
description: 'Create Github release'
required: false
default: false
upload_to_azure:
description: 'Upload to Azure storage'
required: false
default: false
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8' ]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Setup java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Run the Maven verify phase
run: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode --update-snapshots -Dmaven.test.skip=true verify
env:
DM_CONNECTION_STRING: https://ingest-sdkse2etest.eastus.kusto.windows.net
ENGINE_CONNECTION_STRING: https://sdkse2etest.eastus.kusto.windows.net
TEST_DATABASE: e2e
APP_ID: ${{ secrets.APP_ID }}
APP_KEY: ${{ secrets.APP_KEY }}
TENANT_ID: ${{ secrets.TENANT_ID }}
CI_EXECUTION: 1
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- name: Move artifacts to staging
run: |
version=${{ steps.get_version.outputs.VERSION }}
mkdir staging
cp data/target/*.jar staging
cp ingest/target/*.jar staging
cp quickstart/target/*.jar staging
cp data/.flattened-pom.xml staging/kusto-data-$version.pom
cp ingest/.flattened-pom.xml staging/kusto-ingest-$version.pom
- name: Github Release
uses: anton-yurchenko/git-release@v5.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: |
staging/kusto-data-${{ steps.get_version.outputs.VERSION }}.jar
staging/kusto-data-${{ steps.get_version.outputs.VERSION }}-jar-with-dependencies.jar
staging/kusto-data-${{ steps.get_version.outputs.VERSION }}-javadoc.jar
staging/kusto-data-${{ steps.get_version.outputs.VERSION }}-sources.jar
staging/kusto-data-${{ steps.get_version.outputs.VERSION }}.pom
staging/kusto-ingest-${{ steps.get_version.outputs.VERSION }}.jar
staging/kusto-ingest-${{ steps.get_version.outputs.VERSION }}-jar-with-dependencies.jar
staging/kusto-ingest-${{ steps.get_version.outputs.VERSION }}-javadoc.jar
staging/kusto-ingest-${{ steps.get_version.outputs.VERSION }}-sources.jar
staging/kusto-ingest-${{ steps.get_version.outputs.VERSION }}.pom
continue-on-error: true
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.github_release == 'true') }}
- uses: LanceMcCarthy/Action-AzureBlobUpload@v2
name: Uploading to Azure storage
with:
connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING}}
container_name: ${{ secrets.AZURE_STORAGE_CONTAINER}}
source_folder: staging
destination_folder: kusto/java/${{ steps.get_version.outputs.VERSION }}
delete_if_exists: true
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_to_azure == 'true') }}
- name: Trigger pipelines release
uses: jacopocarlini/azure-pipelines@v1.3
with:
azure-devops-project-url: '${{ secrets.AZURE_PIPELINES_RELEASE_REPO }}'
azure-devops-token: '${{ secrets.AZURE_PIPELINES_PAT }}'
azure-pipeline-name: 'java - partner-release'
azure-template-parameters: '{"BlobPath": "kusto/java/${{ steps.get_version.outputs.VERSION }}"}'
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_to_maven == 'true') }}