Skip to content

Commit 0dcc36b

Browse files
committed
add version check
1 parent 341ab28 commit 0dcc36b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/version-check.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: C# SDK Version Check
2+
on:
3+
push:
4+
tags:
5+
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
jobs:
7+
linux:
8+
name: Version Check
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
- name: Set env
14+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
15+
- name: Check
16+
run: |
17+
set -e
18+
grep -qF "<Version>${RELEASE_VERSION}</Version>" src/Qiniu/Qiniu.csproj
19+
grep -qF "v${RELEASE_VERSION}" CHANGELOG.md
20+
grep -qF "public const string VERSION = \"${RELEASE_VERSION}\";" src/Qiniu/QiniuCSharpSDK.cs

0 commit comments

Comments
 (0)