From 5f86bb6c6a3ce03e8b8fe3ae44a709b4a29bd9ea Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 11 Oct 2024 17:20:57 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=A2=9E=E5=8A=A0]1.=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=AE=BE=E7=BD=AE=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-release.yml | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..90b9618 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,51 @@ +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 }} \ No newline at end of file