Skip to content

Nightly

Nightly #837

Workflow file for this run

name: Nightly
on:
schedule:
# Build and publish nightly snapshot at 3:55pm every day
- cron: "55 15 * * *"
workflow_dispatch:
inputs:
pr:
description: "Pull request#"
required: false
env:
CHC_BRANCH: "main"
CHC_VERSION: "0.7.1"
jobs:
nightly:
if: ${{ startsWith(github.repository, 'ClickHouse/') }}
name: "Build and Publish Nightly Snapshot"
runs-on: "ubuntu-latest"
timeout-minutes: 20
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
ref: ${{ env.CHC_BRANCH }}
- name: Check out PR
run: |
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
if: github.event.inputs.pr != ''
- 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}|${{ env.CHC_VERSION }}-SNAPSHOT|g' \
-e 's|^\( <version>\).*\(</version>\)$|\1${{ env.CHC_VERSION }}-SNAPSHOT\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 Snapshot
uses: samuelmeuli/action-maven-publish@v1
with:
maven_profiles: release
maven_args: -q --batch-mode
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 Snapshot
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
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.SONATYPE_TOKEN_USER }}
nexus_password: ${{ secrets.SONATYPE_TOKEN }}