diff --git a/.github/workflows/AutoTag.yml b/.github/workflows/AutoTag.yml index 50cf9e566..4e8a55450 100644 --- a/.github/workflows/AutoTag.yml +++ b/.github/workflows/AutoTag.yml @@ -35,19 +35,16 @@ jobs: version: 22.2.alpha # 步骤 steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - name: Set outputs - id: githash + id: git run: | - echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" - - uses: Klemensas/action-autotag@stable - id: autotag + echo "::set-output name=sha_short::$(git rev-parse --short=8 HEAD)" + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.0 with: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - tag_prefix: "v" - tag_suffix: "-${{ steps.githash.outputs.sha_short }}" + github_token: ${{ secrets.GITHUB_TOKEN }} + custom_tag: v${{env.version}}-${{ steps.git.outputs.sha_short }} + \ No newline at end of file