Skip to content

feat: init

feat: init #3

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 }}"
}
}