-
Notifications
You must be signed in to change notification settings - Fork 630
114 lines (109 loc) · 4.27 KB
/
Copy pathrelease.yml
File metadata and controls
114 lines (109 loc) · 4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Release
on:
workflow_dispatch:
inputs:
version:
description: "Release version"
required: true
env:
CH_VERSION: "25.3"
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: |
sed -i 's|<revision>.*</revision>|<revision>${{ github.event.inputs.version }}</revision>|g' pom.xml
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 }}
server_id: central
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 }}
server_id: central
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
clickhouse-client/target/clickhouse*.jar
clickhouse-data/target/clickhouse*.jar
clickhouse-http-client/target/clickhouse*.jar
clickhouse-jdbc/target/clickhouse*.jar
clickhouse-jdbc/target/bundle/clickhouse*.jar
clickhouse-r2dbc/target/clickhouse*.jar
client-v2/target/client-v2*.jar
jdbc-v2/target/jdbc-v2*.jar
# Tableau users install the latest JDBC driver manually, so a release
# regression hits them with no connector release in between - trigger the
# TDVT suite in ClickHouse/connectors on every release.
# https://github.com/ClickHouse/connectors/issues/71
- name: Mint a token to dispatch into connectors
id: tdvt-token
if: success()
continue-on-error: true # a TDVT dispatch failure must never fail the release
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.WORKFLOW_AUTH_PUBLIC_APP_ID }}
private-key: ${{ secrets.WORKFLOW_AUTH_PUBLIC_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: "connectors"
- name: Trigger Tableau TDVT in connectors
if: success()
continue-on-error: true # a TDVT dispatch failure must never fail the release
env:
GH_TOKEN: ${{ steps.tdvt-token.outputs.token }}
run: |
echo "Dispatching TDVT for clickhouse-jdbc ${{ github.event.inputs.version }}"
gh api repos/ClickHouse/connectors/dispatches \
-f event_type=jdbc-release \
-F "client_payload[jdbc_version]=${{ github.event.inputs.version }}"