changing 1.9.5 release url #312
Workflow file for this run
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
# This workflow builds debezium server tar distributable and then | |
# uploads it to the "voyager-debezium" release as an asset. This is used | |
# internally for running automation tests. | |
# The triggers are for | |
# - pushes to "voyager-main" | |
# where the dist name is debezium-server-latest | |
# - PRs opened against "voyaager-main" | |
# where the dist name is debezium-server-<branch_name> (with / converted to _) | |
# - Tag is pushed with format *.*.*-*.*.*. This will be pushed only in a release branch of name *.*.*-*.*.*-dev | |
# where the release name is the <branch_name>(without the -dev) and dist name is debezium-server-<tag> | |
name: Build Debezium Server | |
on: | |
push: | |
branches: | |
- 2.2.0-1.6.1-dev | |
tags: | |
- '*.*.*-*.*.*' | |
pull_request: | |
branches: | |
- 2.2.0-1.6.1-dev | |
jobs: | |
build_debezium_server: | |
name: "Build Debezium Server" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Action | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Java 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Cache Maven Repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: maven-debezium-test-build-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven-debezium-test-build-${{ hashFiles('**/pom.xml') }} | |
- name: Compute release vars (PUSH) # debezium-server-latest in case it is a push to voyager-main | |
if : ${{ github.event_name == 'push' }} | |
run: | | |
echo "RELEASE_NAME=voyager-debezium" >> "$GITHUB_ENV" | |
echo "DIST_NAME=debezium-server-latest" >> "$GITHUB_ENV" | |
- name: Compute release vars (PR) # debezium-server-<branch_name> (with / converted to _) in case it is a PR event | |
if : ${{ github.event_name == 'pull_request' }} | |
run: | | |
echo "RELEASE_NAME=voyager-debezium" >> "$GITHUB_ENV" | |
echo "DIST_NAME=debezium-server-${GITHUB_HEAD_REF//\//_}" >> "$GITHUB_ENV" | |
- name: Compute release vars (RELEASE) | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
RELEASE_VERSION=$(echo $GITHUB_REF | cut -d / -f 3 ) | |
BRANCH_NAME_WITHOUT_DEV=$(git branch -r --contains $GITHUB_REF | cut -d / -f 2 | sed 's/-dev//') | |
echo "DIST_NAME=debezium-server-${RELEASE_VERSION}" >> "$GITHUB_ENV" | |
echo "RELEASE_NAME=${BRANCH_NAME_WITHOUT_DEV}" >> "$GITHUB_ENV" | |
- name: Build Debezium Server | |
run: | | |
sh buildDebeziumServer.sh | |
cd yb-client-cdc-stream-wrapper/ | |
mvn clean package | |
- name: Package Debezium Server | |
run: | | |
cd debezium-server/debezium-server-dist/target/debezium-server | |
# get latest 1.9.5 version of debezium. Change this during release to point to exact 1.9.5 release. | |
wget -nv https://github.com/yugabyte/debezium/releases/download/1.9.5-1.6.1/debezium-server-1.9.5-1.6.1.tar.gz | |
tar -xvzf debezium-server-1.9.5-1.6.1.tar.gz | |
rm debezium-server-1.9.5-1.6.1.tar.gz | |
mv debezium-server debezium-server-1.9.5 | |
# package yb-client-cdc-stream-wrapper.jar into debezium-server | |
cd ${GITHUB_WORKSPACE} | |
mv yb-client-cdc-stream-wrapper/target/yb-client-cdc-stream-wrapper.jar debezium-server/debezium-server-dist/target/debezium-server/debezium-server-1.9.5/ | |
# package | |
cd ${GITHUB_WORKSPACE}/debezium-server/debezium-server-dist/target | |
tar -zcvf ${DIST_NAME}.tar.gz debezium-server | |
- name: Publish to voyager-debezium release | |
run: | | |
gh release upload ${{ env.RELEASE_NAME }} debezium-server/debezium-server-dist/target/${{ env.DIST_NAME }}.tar.gz --clobber # clobber is to overwrite | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |