Skip to content

Merge pull request #43 from diskcloud/feature/42 #28

Merge pull request #43 from diskcloud/feature/42

Merge pull request #43 from diskcloud/feature/42 #28

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*' # 监听所有标签的推送,格式为 vX.X.X
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.8.1'
- name: Install dependencies
run: npm install
- name: Generate changelog
run: npm run changelog
- name: Commit changelog
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git config --global user.email "crazymryan@gmail.com"
git config --global user.name "CrazyMrYan"
git add CHANGELOG.md
git commit -m "chore(release): update changelog"
git push origin HEAD:main # 确保将更改推送到主分支
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release