Skip to content

Commit

Permalink
feat 修改推release脚本,支持根据名称自动判断PreRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
wyt1215819315 committed Dec 20, 2023
1 parent 41c70a7 commit 6577c2d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,21 @@ jobs:
- uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: ReleaseVersion
run: |
echo ${{ env.RELEASE_VERSION }}
- name: 判断是否PreRelease
run: |
if [[ "${{ env.RELEASE_VERSION }}" == *dev* ]]; then
echo "Setting prerelease to true"
echo "PRERELEASE=true" >> $GITHUB_ENV
else
echo "Setting prerelease to false"
echo "PRERELEASE=false" >> $GITHUB_ENV
fi
- name: 建立JDK17运行环境
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -115,7 +127,7 @@ jobs:
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
prerelease: "${{ env.PRERELEASE }}"
title: "${{ env.RELEASE_VERSION }}"
files: |
build/autoplan_front.zip
Expand Down

0 comments on commit 6577c2d

Please sign in to comment.