This is an automated email from the ASF dual-hosted git repository.

lewismc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika-helm.git


The following commit(s) were added to refs/heads/main by this push:
     new 4924a70  TIKA-4661 Automate tika-helm release on Tika version update 
(#31)
4924a70 is described below

commit 4924a70f1f2a13d7274df8086c44bcae379717f0
Author: Lewis John McGibbney <[email protected]>
AuthorDate: Tue Feb 17 16:57:06 2026 -0800

    TIKA-4661 Automate tika-helm release on Tika version update (#31)
---
 .github/workflows/release.yaml     | 76 ++++++++++++++++++++++++++++++++++++++
 .github/workflows/tag-release.yaml | 63 +++++++++++++++++++++++++++++++
 2 files changed, 139 insertions(+)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
new file mode 100644
index 0000000..b922c70
--- /dev/null
+++ b/.github/workflows/release.yaml
@@ -0,0 +1,76 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This workflow creates a GitHub Release and publishes the Helm chart to the
+# Apache JFrog Artifactory repository whenever a v* tag is pushed.
+#
+# Required GitHub Secrets:
+#   ARTIFACTORY_USERNAME -- Apache JFrog Artifactory username
+#   ARTIFACTORY_PASSWORD -- Apache JFrog Artifactory password
+
+name: Release Helm Chart
+
+on:
+  push:
+    tags:
+      - 'v*'
+
+permissions:
+  contents: write
+
+jobs:
+  release:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v6
+
+      - name: Extract versions from Chart.yaml
+        id: versions
+        run: |
+          CHART_VERSION=$(grep '^version:' Chart.yaml | sed 's/version: 
*"\(.*\)"/\1/')
+          APP_VERSION=$(grep '^appVersion:' Chart.yaml | sed 's/appVersion: 
*"\(.*\)"/\1/')
+          echo "chart_version=$CHART_VERSION" >> "$GITHUB_OUTPUT"
+          echo "app_version=$APP_VERSION" >> "$GITHUB_OUTPUT"
+        shell: bash
+
+      - name: Create GitHub Release
+        uses: softprops/action-gh-release@v2
+        with:
+          tag_name: ${{ github.ref_name }}
+          name: "tika-helm ${{ github.ref_name }}"
+          body: |
+            ## tika-helm ${{ github.ref_name }}
+
+            **Chart version:** `${{ steps.versions.outputs.chart_version }}`
+            **App version (Docker image tag):** `${{ 
steps.versions.outputs.app_version }}`
+
+            [View available tags on Docker 
Hub](https://hub.docker.com/r/apache/tika/tags)
+          draft: false
+          prerelease: false
+
+      - name: Set up Helm
+        uses: azure/setup-helm@v4
+
+      - name: Install helm-push-artifactory-plugin
+        run: helm plugin install 
https://github.com/belitre/helm-push-artifactory-plugin --version 1.0.2
+        shell: bash
+
+      - name: Push Helm chart to Artifactory
+        env:
+          HELM_REPO_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
+          HELM_REPO_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
+        run: helm push-artifactory . https://apache.jfrog.io/artifactory/tika
+        shell: bash
diff --git a/.github/workflows/tag-release.yaml 
b/.github/workflows/tag-release.yaml
new file mode 100644
index 0000000..cca23ca
--- /dev/null
+++ b/.github/workflows/tag-release.yaml
@@ -0,0 +1,63 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Tag Release on Version Update
+
+on:
+  pull_request:
+    types: [closed]
+    branches: [main]
+
+permissions:
+  contents: write
+
+jobs:
+  tag-release:
+    runs-on: ubuntu-latest
+    if: >-
+      github.event.pull_request.merged == true &&
+      startsWith(github.event.pull_request.head.ref, 'auto-update/tika-')
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v6
+        with:
+          fetch-depth: 0
+
+      - name: Extract chart version
+        id: chart-version
+        run: |
+          CHART_VERSION=$(grep '^version:' Chart.yaml | sed 's/version: 
*"\(.*\)"/\1/')
+          echo "version=$CHART_VERSION" >> "$GITHUB_OUTPUT"
+        shell: bash
+
+      - name: Check if tag already exists
+        id: check-tag
+        run: |
+          if git tag -l "v${{ steps.chart-version.outputs.version }}" | grep 
-q .; then
+            echo "Tag v${{ steps.chart-version.outputs.version }} already 
exists."
+            echo "exists=true" >> "$GITHUB_OUTPUT"
+          else
+            echo "Tag v${{ steps.chart-version.outputs.version }} does not 
exist."
+            echo "exists=false" >> "$GITHUB_OUTPUT"
+          fi
+        shell: bash
+
+      - name: Create and push tag
+        if: steps.check-tag.outputs.exists == 'false'
+        run: |
+          TAG="v${{ steps.chart-version.outputs.version }}"
+          git tag -a "$TAG" -m "Release tika-helm $TAG"
+          git push origin "$TAG"
+        shell: bash

Reply via email to