-
Notifications
You must be signed in to change notification settings - Fork 626
87 lines (82 loc) · 3 KB
/
Copy pathrelease.yml
File metadata and controls
87 lines (82 loc) · 3 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
name: Release
on:
workflow_dispatch:
env:
CH_VERSION: "25.3"
jobs:
release:
name: "Build and Publish Artifact"
runs-on: "ubuntu-latest"
permissions:
contents: write
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Read release version
id: version
shell: bash
run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
- name: Install JDK and Maven
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
8
17
cache: 'maven'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- 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>${{ steps.version.outputs.version }}</revision>|g' pom.xml
find . -type f -name "simplelogger.*" -exec rm -fv '{}' \;
- name: Release Maven package
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USER }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: mvn -q --batch-mode -P release -DclickhouseVersion=${{ env.CH_VERSION }} clean deploy
- name: Release R2DBC 0.9.1
working-directory: clickhouse-r2dbc
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USER }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: mvn -q --batch-mode -P release -Dr2dbc-spi.version=0.9.1.RELEASE -DclickhouseVersion=${{ env.CH_VERSION }} clean deploy
- name: Create Pre-release on Github
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ steps.version.outputs.version }}" \
--prerelease \
--title "Release v${{ steps.version.outputs.version }}" \
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