From f7bf41a8c21daf4eefde0ae410475154dd07984d Mon Sep 17 00:00:00 2001 From: MistEO Date: Sun, 14 May 2023 01:26:22 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20release-nightly-ota.yml=20=E6=97=A9?= =?UTF-8?q?=E7=82=B9=E6=8A=8A=20tag=20=E6=8E=A8=E4=B8=8A=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-nightly-ota.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-nightly-ota.yml b/.github/workflows/release-nightly-ota.yml index 0d1cefc2f3..137ddb1ee8 100644 --- a/.github/workflows/release-nightly-ota.yml +++ b/.github/workflows/release-nightly-ota.yml @@ -75,6 +75,17 @@ jobs: } exit 1 + - name: Push tag to main repo + id: push_main_tag + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + + $main_tag_name=$(echo "alpha/${{ steps.set_tag.outputs.tag }}") + git tag $main_tag_name || exit 0 # do nothing if the tag already exists + git push --tags origin HEAD:refs/tags/$main_tag_name + echo "main_tag_name=$main_tag_name" >> $env:GITHUB_OUTPUT + - name: Cache .nuke/temp, ~/.nuget/packages uses: actions/cache@v3 with: @@ -102,16 +113,6 @@ jobs: name: MAA-win-${{ matrix.lowercase_target }} path: artifacts - - name: Push tag to main repo - id: push_main_tag - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - - $main_tag_name=$(echo "alpha/${{ steps.set_tag.outputs.tag }}") - git tag $main_tag_name || exit 0 # do nothing if the tag already exists - git push --tags origin HEAD:refs/tags/$main_tag_name - echo "main_tag_name=$main_tag_name" >> $env:GITHUB_OUTPUT push-tag: needs: build-win-nightly