From 8d3cc047f5b14feaba70abcb3b2bce41c45f7415 Mon Sep 17 00:00:00 2001 From: Rong Zhou Date: Mon, 13 May 2024 12:07:08 +0800 Subject: [PATCH] add version check --- .github/workflows/version-check.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/version-check.yml diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml new file mode 100644 index 00000000..547bcf3d --- /dev/null +++ b/.github/workflows/version-check.yml @@ -0,0 +1,19 @@ +name: Java SDK Version Check +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" +jobs: + linux: + name: Version Check + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV + - name: Check + run: | + set -e + grep -qF "## ${RELEASE_VERSION}" CHANGELOG.md + grep -qF "public static final String VERSION = \"${RELEASE_VERSION}\";" src/main/java/com/qiniu/common/Constants.java