From 60e75b10c63f4234d445512cdd81d6465f3827e4 Mon Sep 17 00:00:00 2001
From: xiaowu <943915349@qq.com>
Date: Mon, 6 Mar 2023 15:25:57 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20https://github.com/NormanGyllenhaal/cana?=
=?UTF-8?q?l-client/issues/21=20https://github.com/NormanGyllenhaal/canal-?=
=?UTF-8?q?client/issues/17=20https://github.com/NormanGyllenhaal/canal-cl?=
=?UTF-8?q?ient/issues/20=20https://github.com/NormanGyllenhaal/canal-clie?=
=?UTF-8?q?nt/issues/18=20https://github.com/NormanGyllenhaal/canal-client?=
=?UTF-8?q?/issues/16=20https://github.com/NormanGyllenhaal/canal-client/i?=
=?UTF-8?q?ssues/10=20https://github.com/NormanGyllenhaal/canal-client/iss?=
=?UTF-8?q?ues/8=20https://github.com/NormanGyllenhaal/canal-client/issues?=
=?UTF-8?q?/5=20https://github.com/NormanGyllenhaal/canal-client/issues/4?=
=?UTF-8?q?=20feat:=20=E6=94=AF=E6=8C=81jdk17/springboot3.x=EF=BC=88?=
=?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81jdk8=EF=BC=89=20=E6=94=AF=E6=8C=81my?=
=?UTF-8?q?batis=20plus=E6=B3=A8=E8=A7=A3=20=E5=8D=87=E7=BA=A7canal-client?=
=?UTF-8?q?=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/auto-merge.yml | 30 ----------------
.github/workflows/build-and-release.yml | 48 +++++++++++++++++++++++++
.github/workflows/publish.yml | 27 +++++++-------
.github/workflows/release.yml | 18 ----------
pom.xml | 2 +-
5 files changed, 63 insertions(+), 62 deletions(-)
delete mode 100644 .github/workflows/auto-merge.yml
create mode 100644 .github/workflows/build-and-release.yml
delete mode 100644 .github/workflows/release.yml
diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml
deleted file mode 100644
index 38b2b06..0000000
--- a/.github/workflows/auto-merge.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: Automerge
-
-on:
- pull_request:
- types:
- - labeled
- - unlabeled
- - synchronize
- - opened
- - edited
- - ready_for_review
- - reopened
- - unlocked
- pull_request_review:
- types:
- - submitted
- status: {}
-
-jobs:
- # 合并发布版本的 pr 到 master
- auto-merge:
- runs-on: ubuntu-latest
- steps:
- - name: Automerge
- uses: 'pascalgn/automerge-action@v0.14.3'
- env:
- GITHUB_TOKEN: '${{ secrets.RELEASE_TOKEN }}'
- MERGE_LABELS: ''
- # 只要是 wang-xiaowu 用户,都进行合并
- MERGE_FILTER_AUTHOR: 'wang-xiaowu'
diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml
new file mode 100644
index 0000000..61dc08f
--- /dev/null
+++ b/.github/workflows/build-and-release.yml
@@ -0,0 +1,48 @@
+name: Build And Release
+
+on:
+ push:
+ branches:
+ - master
+jobs:
+ build:
+ # 配置权限
+ permissions: write-all
+ runs-on: ubuntu-latest
+ steps:
+ # 下载代码
+ - uses: actions/checkout@v3
+ - name: Set up JDK 17
+ # 安装 JDK
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ cache: maven
+ # 配置 settings.xml 一般用于 Mavne 私库验证等
+ # - name: maven-settings-xml-action
+ # uses: whelk-io/maven-settings-xml-action@v20
+ # with:
+ # repositories: ''
+ # servers: ''
+ # Maven 打包
+ - name: Build with Maven
+ run: mvn clean package -DskipTests -Prelease -fpom.xml
+ # 将打包好的 Jar 包 放到 staging 文件夹
+ - run: mkdir staging && cp target/*.jar staging
+ # 设置 jobs Maven pom 版本环境变量
+ - name: Set Release version env variable
+ run: |
+ echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
+ - name: "Build & Test"
+ run: |
+ echo "done!"
+ # 上传文件并发布 Release
+ - uses: "marvinpinto/action-automatic-releases@latest"
+ with:
+ repo_token: "${{ secrets.RELEASE_TOKEN }}"
+ automatic_release_tag: "${{ env.RELEASE_VERSION }}"
+ prerelease: false
+ title: "Release ${{ env.RELEASE_VERSION }}"
+ files: |
+ staging/*.jar
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b71d815..65aef88 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -3,33 +3,34 @@ name: Maven Central Repo Deployment
# 触发脚本的事件 这里为发布release之后触发
on:
release:
- types: [released]
+ types:
+ - released
# 定义一个发行任务
jobs:
publish:
-# 任务运行的环境
+ # 任务运行的环境
runs-on: ubuntu-latest
-# 任务的步骤
+ # 任务的步骤
steps:
-# 1. 声明 checkout 仓库代码到工作区
+ # 1. 声明 checkout 仓库代码到工作区
- name: Checkout Git Repo
- uses: actions/checkout@v2
-# 2. 安装Java 环境 这里会用到的参数就是 Git Action secrets中配置的,
-# 取值要在key前面加 secrets.
+ uses: actions/checkout@v3
+ # 2. 安装Java 环境 这里会用到的参数就是 Git Action secrets中配置的,
+ # 取值要在key前面加 secrets.
- name: Set up Maven Central Repo
uses: actions/setup-java@v3
with:
java-version: 17
- server-id: sonatype-nexus-staging
- server-username: ${{ secrets.OSSRH_USER }}
- server-password: ${{ secrets.OSSRH_PASSWORD }}
- gpg-passphrase: ${{ secrets.GPG_PASSWORD }}
-# 3. 发布到Maven中央仓库
+ distribution: 'temurin'
+ cache: maven
+ # 3. 发布到Maven中央仓库
- name: Publish to Maven Central Repo
-# 这里用到了其他人写的action脚本,详细可以去看他的文档。
+ # 这里用到了其他人写的action脚本,详细可以去看他的文档。
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
gpg_passphrase: ${{ secrets.GPG_PASSWORD }}
nexus_username: ${{ secrets.OSSRH_USER }}
nexus_password: ${{ secrets.OSSRH_PASSWORD }}
+ server_id: ossrh
+ maven_goals_phases: clean deploy -DskipTests -Prelease
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 543fa06..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-on:
- push:
- branches:
- - master
-
-name: Release
-
-jobs:
- release-please:
- runs-on: ubuntu-latest
- steps:
- - uses: GoogleCloudPlatform/release-please-action@v3
- id: release
- with:
- token: ${{ secrets.RELEASE_TOKEN }}
- release-type: maven
- package-name: version
- changelog-types: '[{"type": "types", "section":"Types", "hidden": false},{"type": "revert", "section":"Reverts", "hidden": false},{"type": "feat", "section": "Features", "hidden": false},{"type": "fix", "section": "Bug Fixes", "hidden": false},{"type": "improvement", "section": "Feature Improvements", "hidden": false},{"type": "docs", "section":"Docs", "hidden": false},{"type": "style", "section":"Styling", "hidden": false},{"type": "refactor", "section":"Code Refactoring", "hidden": false},{"type": "perf", "section":"Performance Improvements", "hidden": false},{"type": "test", "section":"Tests", "hidden": false},{"type": "build", "section":"Build System", "hidden": false},{"type": "ci", "section":"CI", "hidden":false}]'
diff --git a/pom.xml b/pom.xml
index 355967e..aafc68e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
io.github.wang-xiaowu
behappy-canal
- 3.0.0.RELEASE
+ 3.0.0
behappy-canal
canal-数据同步
pom