Skip to content

chore(release): bump version #579

chore(release): bump version

chore(release): bump version #579

Workflow file for this run

name: 🚀 Auto Release
on:
push:
branches:
- latest # 正式版
- beta
- alpha
- next
jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && startsWith(github.event.head_commit.message , 'chore(release):')"
steps:
- uses: actions/checkout@v3
# Python 3.11 和 node-gyp 有兼容问题, 导致无法安装依赖
# https://github.com/slint-ui/slint/commit/a9c48e33502fdebc36c5aa2f4f516c2218424679#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133dd
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16 # semantic-release 需要 >= 16 的 Node.js 环境
cache: 'yarn'
# 发布开始通知
- name: Release start ding talk dev group notify
uses: zcong1993/actions-ding@master
with:
dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }}
ignoreError: true
body: |
{
"msgtype": "link",
"link": {
"title": "🚑 开始自动发布 🚑",
"text": "🔗 请点击链接查看详情",
"messageUrl": "https://github.com/antvis/S2/actions/workflows/auto-release.yml",
"picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*gt5-RZDjt3IAAAAAAAAAAAAADmJ7AQ/original"
}
}
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
# 自动发布完成后 触发 github.release.published 事件
# 如果是 action 自带的 机器人 token, 出于安全考虑, github 会禁止循环触发, 使用真实用户的 token 可解决这个问题
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.JINKE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn release
# 发布失败通知内部开发群
- name: Release failed ding talk dev group notify
if: ${{ failure() }}
uses: zcong1993/actions-ding@master
with:
dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }}
ignoreError: true
body: |
{
"msgtype": "link",
"link": {
"title": "🚨 自动发布失败",
"text": "🔗 请点击链接查看具体原因, 及时修复, 尝试点击右上角 [Re-run all jobs] 重试, 或手动发布 🚑",
"messageUrl": "https://github.com/antvis/S2/actions/workflows/auto-release.yml",
"picUrl": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*PRSkSqsE_vYAAAAAAAAAAAAADmJ7AQ/original"
}
}