Skip to content

Commit

Permalink
ci: fix get main version (#2414)
Browse files Browse the repository at this point in the history
* ci: fix get main version

* ci: close released DingTalk notify

* chore: note
  • Loading branch information
lvisei authored Apr 17, 2024
1 parent 177711f commit a49cd6f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/release-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ jobs:
if: startswith(github.event.release.tag_name, '@antv/l7@')
runs-on: ubuntu-latest
steps:
- name: DingTalk Release Notify
uses: visiky/dingtalk-release-notify@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DING_TALK_TOKEN: ${{ secrets.DING_TALK_ACCESS_TOKEN}}
notify_title: '🎉 L7 发布 release {release_tag} 🎉'
notify_body: '## { title } <hr /> { body } <hr />'
notify_footer: '前往 [**L7 Releases**]({ release_url }) 查看完整信息.'
at_all: false
enable_prerelease: false
- name: After changesets
run: |
echo "::debug::Event release ${{github.event.release}}"
# 暂时关闭 DingTalk Release Notify,待解决问题:Release Notify action 获取 Latest Release 是上一个版本问题
# - name: DingTalk Release Notify
# uses: visiky/dingtalk-release-notify@main
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DING_TALK_TOKEN: ${{ secrets.DING_TALK_ACCESS_TOKEN}}
# notify_title: '🎉 L7 发布 release {release_tag} 🎉'
# notify_body: '## { title } <hr /> { body } <hr />'
# notify_footer: '前往 [**L7 Releases**]({ release_url }) 查看完整信息.'
# at_all: false
# enable_prerelease: false
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ jobs:
NPM_TOKEN: ${{ secrets.YJ_NPM_TOKEN }}
with:
publish: pnpm publish-packages
# 暂时关闭自动创建 Github Releases,待解决以下问题:
# 1. 只创建主包 @antv/l7 的 Github Release,并解决同步所有日志到 release body
# 2. Github Releases 创建非 Latest,Release Notify action 获取 Latest Release 是上一个版本问题
# 暂时关闭自动创建 Github Releases,待解决问题:
# - 只创建主包 @antv/l7 的 Github Release,并解决同步所有日志到 release body
createGithubReleases: false

# when release not publish
Expand Down Expand Up @@ -120,12 +119,12 @@ jobs:
with:
result-encoding: string
script: |
const publishedPackages = ${{ fromJSON(needs.release.outputs.publishedPackages) }};
const mainPackage = publishedPackages.find((item) => item.name === "@antv/l7");
const publishedPackages = JSON.parse(${{ needs.release.outputs.publishedPackages }});
const mainPackage = publishedPackages.find((item) => item.name === '@antv/l7');
const version = mainPackage ? `@antv/l7@${mainPackage.version}` : '';
return version;
# release successful notify, only trigger by bot PR and not pre release
# release successful notify, only trigger by bot PR and not prerelease (like: @antv/[email protected])
- name: Release successful ding talk dev group notify
if: github.event_name == 'pull_request_review' && !contains(steps.main_version.outputs.result, '-')
uses: zcong1993/actions-ding@master
Expand Down

0 comments on commit a49cd6f

Please sign in to comment.