From 98644660a3e4006f0f684caedde3e0fe5a548b16 Mon Sep 17 00:00:00 2001 From: jennier0107 Date: Sun, 2 Jun 2024 19:23:56 +0800 Subject: [PATCH] update release.yml*4 --- .github/workflows/release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c18b6e6..1bda202 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,7 @@ name: Release on: push: - tags: - - v** + branches: [main] jobs: build_zip: @@ -13,6 +12,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Get the latest tag + id: get_tag + run: echo "latest_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + - name: Zip the extension file run: zip -qq -r markdown-tools.zip ./markdown-tools working-directory: . @@ -32,6 +35,7 @@ jobs: - name: Release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ github.event.release.tag_name }} + tag_name: ${{ env.latest_tag }} + token: ${{ secrets.ACCESS_TOKEN }} files: | - markdown-tools.zip \ No newline at end of file + ext/markdown-tools.zip \ No newline at end of file