Skip to content

Commit

Permalink
chore(release): simplify GitHub Release workflow by removing Git tag …
Browse files Browse the repository at this point in the history
…check

- Removed the step that checks for Git tags before publishing the GitHub Release for the editor package.
- Updated the release step to trigger based on the presence of tags directly using the GitHub Actions context.

This change streamlines the release process, ensuring that releases are published whenever a tag is created.
  • Loading branch information
cycleccc committed Jan 20, 2025
1 parent 1f75d99 commit e56e242
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,24 +101,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# 检查是否有 Git 标签
- name: Check for Git tag
id: check_tag
run: |
if [ -z "$(git tag --points-at HEAD)" ]; then
echo "tag_exists=false" >> $GITHUB_OUTPUT
else
echo "tag_exists=true" >> $GITHUB_OUTPUT
fi
# 发布 GitHub Release,仅针对 editor 包
# 发布 GitHub Release
- name: Publish GitHub Release for editor
if: steps.check_tag.outputs.tag_exists == 'true' # 仅在存在标签时发布
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
packages/editor/dist/** # 仅附加 editor 包的构建产物
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')

0 comments on commit e56e242

Please sign in to comment.