From d16b61c129bdb110821607a788f32341db5b2458 Mon Sep 17 00:00:00 2001 From: Hny0305Lin <1553809191@qq.com> Date: Mon, 8 Jul 2024 09:43:29 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89Release=201.3=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9Android=20CI=20Release=E7=BC=96=E8=AF=91=E9=93=BE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/androidsign.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/androidsign.yml b/.github/workflows/androidsign.yml index fcaef16..91c9b6e 100644 --- a/.github/workflows/androidsign.yml +++ b/.github/workflows/androidsign.yml @@ -95,6 +95,15 @@ jobs: exit 1 fi + - name: Check and Delete Existing Tag + run: | + if git rev-parse ${{ github.ref_name }} >/dev/null 2>&1; then + git tag -d ${{ github.ref_name }} + git push --delete origin ${{ github.ref_name }} + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Bump version and generate changelog id: version run: | @@ -102,21 +111,18 @@ jobs: git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' git fetch origin - git branch -a # 列出所有分支,调试信息 git checkout ${{ github.ref_name }} || git checkout -b ${{ github.ref_name }} origin/${{ github.ref_name }} npx standard-version --release-as minor git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git git push --follow-tags origin ${{ github.ref_name }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - continue-on-error: true - name: Get Commit Message id: get_commit_message run: | cd NLChat echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" >> $GITHUB_ENV - continue-on-error: true - name: Create or Update Release Notes uses: softprops/action-gh-release@v1 @@ -128,7 +134,6 @@ jobs: prerelease: false env: GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # 使用环境变量 - continue-on-error: true - name: Release uses: ncipollo/release-action@v1 @@ -136,7 +141,6 @@ jobs: artifacts: "NLChat_${{ github.ref_name }}.apk" token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # 使用 PAT generateReleaseNotes: true - continue-on-error: true multi-platform-test: runs-on: ubuntu-latest