Release #87
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Release version" | |
required: true | |
default: "0.7.2-SNAPSHOT" | |
env: | |
CH_VERSION: "24.8" | |
jobs: | |
release: | |
name: "Build and Publish Artifact" | |
runs-on: "ubuntu-latest" | |
permissions: write-all | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install JDK and Maven | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
8 | |
17 | |
cache: 'maven' | |
- name: Setup Toolchain | |
shell: bash | |
run: | | |
mkdir -p $HOME/.m2 \ | |
&& cat << EOF > $HOME/.m2/toolchains.xml | |
<?xml version="1.0" encoding="UTF8"?> | |
<toolchains> | |
<toolchain> | |
<type>jdk</type> | |
<provides> | |
<version>17</version> | |
</provides> | |
<configuration> | |
<jdkHome>${{ env.JAVA_HOME }}</jdkHome> | |
</configuration> | |
</toolchain> | |
</toolchains> | |
EOF | |
- name: Update Configuration | |
run: | | |
find . -type f -name "pom.xml" -exec sed -i -e 's|${revision}|${{ github.event.inputs.version }}|g' \ | |
-e 's|^\( <version>\).*\(</version>\)$|\1${{ github.event.inputs.version }}\2|' \ | |
-e 's|${parent.groupId}|com.clickhouse|g' -e 's|${project.parent.groupId}|com.clickhouse|g' '{}' \; | |
find . -type f -name "simplelogger.*" -exec rm -fv '{}' \; | |
- name: Release Maven package | |
uses: samuelmeuli/action-maven-publish@v1 | |
with: | |
maven_profiles: release | |
maven_args: -q --batch-mode -DclickhouseVersion=${{ env.CH_VERSION }} | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
nexus_username: ${{ secrets.SONATYPE_TOKEN_USER }} | |
nexus_password: ${{ secrets.SONATYPE_TOKEN }} | |
- name: Release R2DBC 0.9.1 | |
uses: samuelmeuli/action-maven-publish@v1 | |
with: | |
directory: clickhouse-r2dbc | |
maven_profiles: release | |
maven_args: -q --batch-mode -Dr2dbc-spi.version=0.9.1.RELEASE -DclickhouseVersion=${{ env.CH_VERSION }} | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
nexus_username: ${{ secrets.SONATYPE_TOKEN_USER }} | |
nexus_password: ${{ secrets.SONATYPE_TOKEN }} | |
- name: Create Pre-release on Github | |
uses: "zhicwu/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "v${{ github.event.inputs.version }}" | |
prerelease: true | |
title: "Release v${{ github.event.inputs.version }}" | |
files: | | |
LICENSE | |
**/target/clickhouse*.jar |