fix: 更新cicd文件

This commit is contained in:
chenwj113 2024-05-29 18:56:19 +08:00
parent f762052924
commit a56a5c2936
1 changed files with 13 additions and 1 deletions

View File

@ -8,5 +8,17 @@ jobs:
gitea-action-test: gitea-action-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: "echo ${{ github.event.head_commit.message }}" - run: |
commit_msg=${{ github.event.head_commit.message }}
version=v1.0.0
if [[ commit_msg == v* ]] then;
version=$(echo $version | sed 's/\"//g' | awk -F"." '{$1=$1+1;$2=0;$3=0}1' OFS=".")
if [[ commit_msg == feat* ]] then;
version=$(echo $version | sed 's/\"//g' | awk -F"." '{$2=$2+1}1' OFS="." )
elif [[ commit_msg == fix* ]] then;
version=$(echo $version | sed 's/\"//g' | awk -F"." '{$3=$3+1}1' OFS="." )
elif [[ commit_msg == bugfix* ]] then;
version=$(echo $version | sed 's/\"//g' | awk -F"." '{$3=$3+1}1' OFS=".")
fi
echo $version
- run: echo "This job's status is ${{ job.status }}." - run: echo "This job's status is ${{ job.status }}."