Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add publishing. #1

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
workflow_dispatch:

permissions:
contents: write

Expand Down Expand Up @@ -30,6 +30,14 @@ jobs:
with:
arguments: createConfluentArchive
gradle-version: '7.4.2'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Publish package
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.PACKAGES_WRITE_TOKEN }}

- name: release
uses: actions/create-release@v1
id: create_release
Expand All @@ -49,6 +57,7 @@ jobs:
asset_path: ./build/confluent/clickhouse-kafka-connect-${{ env.RELEASE_VERSION }}.zip
asset_name: clickhouse-kafka-connect-${{ env.RELEASE_VERSION }}.zip
asset_content_type: application/zip

- name: Tag latest commit as release
run: |
git config --local user.email "[email protected]"
Expand Down
23 changes: 22 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.net.URI

val defaultJdkVersion = 17
java {
Expand All @@ -35,9 +36,10 @@ plugins {
id("com.github.gmazzo.buildconfig") version "5.5.0"
id("com.diffplug.spotless") version "6.25.0"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("co.uzzu.dotenv.gradle") version "4.0.0" apply true
}

group = "com.clickhouse.kafka"
group = "com.airthings.clickhouse"
version = file("VERSION").readText().trim()
description = "The official ClickHouse Apache Kafka Connect Connector."

Expand Down Expand Up @@ -260,3 +262,22 @@ tasks.register<Zip>("createConfluentArchive") {
archiveVersion.set(project.version.toString())
destinationDirectory.set(file("$buildDir/confluent"))
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = URI("https://maven.pkg.github.com/airthings/clickhouse-kafka-connect")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}

publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}
Loading