Skip to content

Commit

Permalink
ci: Adjust github-release process
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinerer committed Dec 22, 2024
1 parent 64e74e3 commit 10cd36d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@ jobs:

- name: CI:test
run: |
pnpm test domEmit emitter -- --coverage
- name: CI:build
run: pnpm build --clean
pnpm test domEmit emitter kitify -- --coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

##################### 以下是执行发布流程工作

# 从 package.json 中读取最后发布 commit
- name: 📝 Get release commit from package.json 🔑
id: get_pkg_release
Expand All @@ -74,6 +73,10 @@ jobs:
echo "Last release commit: $LAST_RELEASE"
echo "LAST_RELEASE_COMMIT=$LAST_RELEASE" >> $GITHUB_ENV
- name: CI:build
if: env.LAST_RELEASE_COMMIT != env.PKG_RELEASE_COMMIT
run: pnpm build --clean

- name: Create Release Pull Request or Publish to npm 🔐
# 如果有新的 `release: ` 提交记录, 则执行发布
if: env.LAST_RELEASE_COMMIT != env.PKG_RELEASE_COMMIT
Expand Down

0 comments on commit 10cd36d

Please sign in to comment.