This is an automated email from the ASF dual-hosted git repository.
gujiaweijoe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/bifromq.git
The following commit(s) were added to refs/heads/main by this push:
new bfc915aac First release chores (#194)
bfc915aac is described below
commit bfc915aac6dfcea2e6c90e1b6a375f5c752649b6
Author: Yonny(Yu) Hao <[email protected]>
AuthorDate: Fri Nov 28 18:30:01 2025 +0800
First release chores (#194)
1. Add missing dep module & fix bug in plugin-release script
2. Add workflow for publishing docker image
---
.github/workflows/docker-publish.yml | 51 +++++++++++++++++++++++++++++++
bifromq-plugin/bifromq-plugin-bom/pom.xml | 2 +-
bifromq-plugin/plugin-release/pom.xml | 1 +
release/plugin-release.sh | 18 +++++------
4 files changed, 62 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/docker-publish.yml
b/.github/workflows/docker-publish.yml
new file mode 100644
index 000000000..22087b7d8
--- /dev/null
+++ b/.github/workflows/docker-publish.yml
@@ -0,0 +1,51 @@
+name: Docker Publish
+
+on:
+ workflow_dispatch:
+ inputs:
+ version:
+ description: 'Example: 4.0.0-incubating'
+ required: true
+ artifact_url:
+ description: 'Optional; default resolves from version'
+ required: false
+
+permissions:
+ contents: read
+
+jobs:
+ publish:
+ if: github.repository == 'apache/bifromq'
+ name: "Publish Docker Image"
+ runs-on: ubuntu-latest
+ env:
+ IMAGE_REPO: apache/bifromq
+ steps:
+ - uses: actions/checkout@v4
+ - uses: docker/setup-qemu-action@v3
+ - uses: docker/setup-buildx-action@v3
+ - name: "Login DockerHub"
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKERHUB_USER }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: "Download and verify artifact"
+ run: |
+ set -euo pipefail
+ ARTIFACT_URL="${{ inputs.artifact_url }}"
+ if [ -z "$ARTIFACT_URL" ]; then
+ ARTIFACT_URL="https://downloads.apache.org/incubator/bifromq/${{
inputs.version }}/apache-bifromq-${{ inputs.version }}.tar.gz"
+ fi
+ curl -fSL "$ARTIFACT_URL" -o /tmp/apache-bifromq-${{ inputs.version
}}.tar.gz
+ curl -fSL "${ARTIFACT_URL}.sha512" -o /tmp/apache-bifromq-${{
inputs.version }}.tar.gz.sha512
+ cd /tmp
+ sha512sum --check "apache-bifromq-${{ inputs.version
}}.tar.gz.sha512"
+ - name: "Build image"
+ run: |
+ set -euo pipefail
+ chmod +x release/docker-build.sh
+ release/docker-build.sh -t "${IMAGE_REPO}:${{ inputs.version }}"
"/tmp/apache-bifromq-${{ inputs.version }}.tar.gz"
+ - name: "Push image"
+ run: |
+ set -euo pipefail
+ docker push "${IMAGE_REPO}:${{ inputs.version }}"
\ No newline at end of file
diff --git a/bifromq-plugin/bifromq-plugin-bom/pom.xml
b/bifromq-plugin/bifromq-plugin-bom/pom.xml
index 0bc6c5150..baeba4227 100644
--- a/bifromq-plugin/bifromq-plugin-bom/pom.xml
+++ b/bifromq-plugin/bifromq-plugin-bom/pom.xml
@@ -32,7 +32,7 @@
<artifactId>bifromq-plugin-bom</artifactId>
<packaging>pom</packaging>
<name>Apache BifroMQ Plugin BOM</name>
- <description>Bill of materials for Apache BifroMQ plugin APIs and
archetype.</description>
+ <description>Bill of materials for Apache BifroMQ plugin
APIs.</description>
<dependencyManagement>
<dependencies>
diff --git a/bifromq-plugin/plugin-release/pom.xml
b/bifromq-plugin/plugin-release/pom.xml
index 1ac7c4d3b..4cec35cb8 100644
--- a/bifromq-plugin/plugin-release/pom.xml
+++ b/bifromq-plugin/plugin-release/pom.xml
@@ -38,6 +38,7 @@
</properties>
<modules>
+ <module>../../bifromq-common-type</module>
<module>../bifromq-plugin-archetype</module>
<module>../bifromq-plugin-auth-provider</module>
<module>../bifromq-plugin-client-balancer</module>
diff --git a/release/plugin-release.sh b/release/plugin-release.sh
index 41cb075d1..6349b91ec 100755
--- a/release/plugin-release.sh
+++ b/release/plugin-release.sh
@@ -84,22 +84,22 @@ GPG_OPT=("-Dgpg.useagent=true" "-Dgpg.executable=gpg")
mvn -N -f "${ROOT_DIR}/pom.xml" \
-DskipTests \
- "${SKIP_REMOTE_STAGING_OPT[@]}" \
- "${ALT_DEPLOY_OPT[@]}" \
- "${GPG_OPT[@]}" \
+ ${SKIP_REMOTE_STAGING_OPT[@]+"${SKIP_REMOTE_STAGING_OPT[@]}"} \
+ ${ALT_DEPLOY_OPT[@]+"${ALT_DEPLOY_OPT[@]}"} \
+ ${GPG_OPT[@]+"${GPG_OPT[@]}"} \
deploy
mvn -N -f "${ROOT_DIR}/bifromq-plugin/pom.xml" \
-DskipTests \
- "${SKIP_REMOTE_STAGING_OPT[@]}" \
- "${ALT_DEPLOY_OPT[@]}" \
- "${GPG_OPT[@]}" \
+ ${SKIP_REMOTE_STAGING_OPT[@]+"${SKIP_REMOTE_STAGING_OPT[@]}"} \
+ ${ALT_DEPLOY_OPT[@]+"${ALT_DEPLOY_OPT[@]}"} \
+ ${GPG_OPT[@]+"${GPG_OPT[@]}"} \
deploy
mvn -f "${ROOT_DIR}/bifromq-plugin/plugin-release/pom.xml" \
-Papache-release \
-DskipTests \
- "${SKIP_REMOTE_STAGING_OPT[@]}" \
- "${ALT_DEPLOY_OPT[@]}" \
- "${GPG_OPT[@]}" \
+ ${SKIP_REMOTE_STAGING_OPT[@]+"${SKIP_REMOTE_STAGING_OPT[@]}"} \
+ ${ALT_DEPLOY_OPT[@]+"${ALT_DEPLOY_OPT[@]}"} \
+ ${GPG_OPT[@]+"${GPG_OPT[@]}"} \
deploy