Skip to content

feat: 🎸 support custome table header/footer #124

feat: 🎸 support custome table header/footer

feat: 🎸 support custome table header/footer #124

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Release CI
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "*/v*.*.*" # Match tags like antd/v1.0.0-alpha.0, antd-v5/v1.0.0-beta.0
permissions:
contents: write
discussions: write
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Parse Tag
id: parse_tag
run: |
# 获取标签名称
tag_name="${GITHUB_REF:10}"
# 提取功能模块名称
module_name=$(echo $tag_name | cut -d'/' -f1)
# 提取版本号
version=$(echo $tag_name | cut -d'/' -f2)
tag="latest"
pre_release=false
# 检查是否预发布
if [[ $tag_name == *"alpha"* ]]; then
tag="alpha"
pre_release=true
fi
if [[ $tag_name == *"beta"* ]]; then
tag="beta"
pre_release=true
fi
echo "::set-output name=pre_release::$pre_release"
echo "::set-output name=module_name::$module_name"
echo "::set-output name=tag_name::$tag_name"
echo "::set-output name=version::$version"
echo "::set-output name=tag::$tag"
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: |
bun i
bun scripts/switch.ts ${{steps.parse_tag.outputs.module_name}} build
bunx father build
# 更新 package.json 文件中的版本号
sed -i "s/\"version\": \".*\"/\"version\": \"${{steps.parse_tag.outputs.version}}\"/" package.json
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: |
npm publish --access=public --tag ${{steps.parse_tag.outputs.tag}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_ACCESS_TOKEN}}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
prerelease: "${{ steps.parse_tag.outputs.pre_release }}"
tag_name: "${{ steps.parse_tag.outputs.tag_name }}"
body: '<a href="https://github.com/charlzyx/pro.formily/blob/master/CHANGELOG.md">CHANGELOG</a>'