From e8ecaf0eedf2874065d1db5df80217b84cba4fd9 Mon Sep 17 00:00:00 2001 From: zhiyi Date: Thu, 3 Oct 2024 02:51:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E6=94=B9auto-release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-release.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 5dfb8e6..10fb41f 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -26,12 +26,20 @@ jobs: commit_count=$(git log --since="$today 00:00:00" --until="$today 23:59:59" --pretty=format: --name-only | grep -c '^gfw.pac$') echo "::set-output name=commit_count::${commit_count}" + - name: Create Tag + id: create_tag + run: | + tag_name=v$(date +%Y%m%d).${{ steps.commit_count.outputs.commit_count }} + git tag $tag_name + git push origin $tag_name + echo "::set-output name=tag_name::$tag_name" + - name: Create Release id: create_release uses: softprops/action-gh-release@v1 with: - # tag_name: v$(date +%Y%m%d)-${{ steps.commit_count.outputs.commit_count }} - name: $(date +%Y%m%d)-${{ steps.commit_count.outputs.commit_count }} + tag_name: v$(date +%Y%m%d).${{ steps.commit_count.outputs.commit_count }} + name: $(date +%Y%m%d).${{ steps.commit_count.outputs.commit_count }} body: "Automatically generated release for pac file update" draft: false prerelease: false