fix: 修复版本tag异常的工作流

This commit is contained in:
Blank 2025-05-30 23:56:23 +08:00
parent 82b8e3f7a5
commit 8fc77f90af
1 changed files with 53 additions and 51 deletions

View File

@ -1,51 +1,53 @@
name: Publish Release
on:
push:
tags:
- '*'
# branches: [main]
#schedule:
# 定时任务,每天 UTC 时间 0 点运行
#- cron: "0 0 * * *"
#workflow_dispatch:
permissions: # Global permissions configuration starts here
contents: read # 'read' access to repository contents
pull-requests: write # 'write' access to pull requests
jobs:
tags:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # 为了 git pull --unshallow我们需要获取所有的提交历史
- name: Set up Git user
run: |
git config --global user.email "wangfj11@foxmail.com"
git config --global user.name "AlianBlank"
- name: "✏️ Generate release changelog"
uses: heinrichreimer/action-github-changelog-generator@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit CHANGELOG.md
run: |
git add CHANGELOG.md
git commit -m "[修改]1.修改更新日志"
- name: change-version-by-tag
uses: AlianBlank/github-action-tag-version@1.0.0
with:
version: ${{ github.ref_name }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.head_ref }}
name: Publish Release
on:
push:
tags:
- '*'
# branches: [main]
#schedule:
# 定时任务,每天 UTC 时间 0 点运行
#- cron: "0 0 * * *"
#workflow_dispatch:
permissions: # Global permissions configuration starts here
contents: read # 'read' access to repository contents
pull-requests: write # 'write' access to pull requests
jobs:
tags:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # 为了 git pull --unshallow我们需要获取所有的提交历史
- name: Set up Git user
run: |
git config --global user.email "wangfj11@foxmail.com"
git config --global user.name "AlianBlank"
- name: "✏️ Generate release changelog"
uses: heinrichreimer/action-github-changelog-generator@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit CHANGELOG.md
run: |
git add CHANGELOG.md
git commit -m "[修改]1.修改更新日志"
- name: change-version-by-tag
uses: AlianBlank/github-action-tag-version@1.1.0
with:
version: ${{ github.ref_name }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
force: true
tags: true