-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.36 KB
/
publish_module.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: 模块发布
on:
push:
paths:
- 'gradle.properties'
branches:
- master
jobs:
generate-props:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Publish Version
id: SET-PUBLISH-VERSION
run: |
prev_version_1=$(grep "VERSION_NAME=" gradle.properties | sed -E 's/VERSION_NAME=([0-9]+)\.[0-9]+\.[0-9]+/\1/')
prev_version_2=$(grep "VERSION_NAME=" gradle.properties | sed -E 's/VERSION_NAME=[0-9]+\.([0-9]+)\.[0-9]+/\1/')
prev_version_3=$(grep "VERSION_NAME=" gradle.properties | sed -E 's/VERSION_NAME=[0-9]+\.[0-9]+\.([0-9]+)/\1/')
formatted_version=$(printf "%s" "$prev_version_1.$prev_version_2.$prev_version_3")
echo $prev_version_1
echo $prev_version_2
echo $prev_version_3
echo $formatted_version
echo "publish_version=$formatted_version" >> $GITHUB_OUTPUT
- name: Send
uses: zcong1993/actions-ding@master
with:
dingToken: 814b2467f4a2cd354fe6317e8bf6d2bd544f1c60bb4f1a6971d09f573306a7c6
body: |
{
"msgtype": "markdown",
"markdown": {
"title": "开始打包",
"text": "ClannadUnit 开始打包 V${{ steps.SET-PUBLISH-VERSION.outputs.publish_version }}"
}
}