From 927c53a7bd9a03312ba3facc31bf4010aa421e4f Mon Sep 17 00:00:00 2001 From: Kirill Chernyshov Date: Tue, 17 Oct 2023 11:37:13 +0200 Subject: [PATCH] Add release action --- .github/workflows/release.yml | 31 +++++++++++++++++++ pom.xml | 3 +- .../ElasticsearchSourceConnectorTask.java | 2 -- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8852409 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: push + +jobs: + + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + + - name: Build + run: | + mvn -Drevision=${{ github.ref_name }} --batch-mode --update-snapshots verify + mv ./target/kafka-connect-plugins-${{ github.ref_name }}-jar-with-dependencies.jar ./kafka-connect-plugins-${{ github.ref_name }}.jar + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + kafka-connect-plugins-${{ github.ref_name }}.jar diff --git a/pom.xml b/pom.xml index 1504e57..f9ec948 100644 --- a/pom.xml +++ b/pom.xml @@ -8,9 +8,10 @@ threatgrid kafka-connect-plugins Collection of Kafka Connect plugins - 1.0 + ${revision} + 1.0 3.3.2 5.9.2 1.17.6 diff --git a/src/main/java/threatgrid/kafka/connect/ElasticsearchSourceConnectorTask.java b/src/main/java/threatgrid/kafka/connect/ElasticsearchSourceConnectorTask.java index d87aab4..279dffc 100644 --- a/src/main/java/threatgrid/kafka/connect/ElasticsearchSourceConnectorTask.java +++ b/src/main/java/threatgrid/kafka/connect/ElasticsearchSourceConnectorTask.java @@ -4,13 +4,11 @@ import java.io.StringReader; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; -import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode;