chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: cnchar
|
||||
ko_fi: theajack
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,42 @@
|
||||
name-template: 'v$RESOLVED_VERSION'
|
||||
tag-template: 'v$RESOLVED_VERSION'
|
||||
template: |
|
||||
# What's Changed
|
||||
|
||||
### [Version Log](https://github.com/theajack/cnchar/blob/master/helper/version.md)
|
||||
|
||||
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
|
||||
|
||||
categories:
|
||||
- title: 'Breaking'
|
||||
label: 'type: breaking'
|
||||
- title: 'New'
|
||||
label: 'type: feature'
|
||||
- title: 'Bug Fixes'
|
||||
label: 'type: bug'
|
||||
- title: 'Maintenance'
|
||||
label: 'type: maintenance'
|
||||
- title: 'Documentation'
|
||||
label: 'type: docs'
|
||||
- title: 'Other changes'
|
||||
- title: 'Dependency Updates'
|
||||
label: 'type: dependencies'
|
||||
collapse-after: 5
|
||||
|
||||
version-resolver:
|
||||
major:
|
||||
labels:
|
||||
- 'type: breaking'
|
||||
minor:
|
||||
labels:
|
||||
- 'type: feature'
|
||||
patch:
|
||||
labels:
|
||||
- 'type: bug'
|
||||
- 'type: maintenance'
|
||||
- 'type: docs'
|
||||
- 'type: dependencies'
|
||||
- 'type: security'
|
||||
|
||||
exclude-labels:
|
||||
- 'skip-changelog'
|
||||
@@ -0,0 +1,62 @@
|
||||
name: Docs
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- d*.*.*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
registry-url: https://registry.npmjs.org
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Npm Install
|
||||
run: npm install
|
||||
|
||||
- name: Version
|
||||
id: version
|
||||
run: |
|
||||
tag=${GITHUB_REF/refs\/tags\//}
|
||||
version=${tag#d}
|
||||
echo "::set-output name=version::${version}"
|
||||
|
||||
- name: Npm Link # build npm
|
||||
run: |
|
||||
cd ./src/cnchar-types
|
||||
npm link
|
||||
cd ../cnchar
|
||||
npm link cnchar-types
|
||||
cd ../..
|
||||
|
||||
- name: Build # build npm
|
||||
run: node ./helper/scripts/build.js ${{ steps.version.outputs.version }} all # 此处只需要build一个all即可
|
||||
|
||||
- name: Build Docs # build docs
|
||||
run: npm run build:docs
|
||||
|
||||
- name: Pages # github pages
|
||||
uses: JamesIves/github-pages-deploy-action@v4.3.0
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: docs
|
||||
|
||||
- name: Purge # purge cdn # 此处只需要purge docs即可
|
||||
run: |
|
||||
node ./helper/scripts/purge-docs.js
|
||||
@@ -0,0 +1,82 @@
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*.*.*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
registry-url: https://registry.npmjs.org
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Npm Install
|
||||
run: |
|
||||
npm config set strict-ssl false
|
||||
npm install --force
|
||||
npm config set strict-ssl true
|
||||
|
||||
- name: Version
|
||||
id: version
|
||||
run: |
|
||||
tag=${GITHUB_REF/refs\/tags\//}
|
||||
version=${tag#v}
|
||||
echo "::set-output name=version::${version}"
|
||||
|
||||
- name: Npm Link # build npm
|
||||
run: |
|
||||
cd ./src/cnchar-types
|
||||
npm link
|
||||
cd ../cnchar
|
||||
npm link cnchar-types
|
||||
cd ../..
|
||||
|
||||
- name: Build # build npm
|
||||
run: node ./helper/scripts/build.js ${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Test # test
|
||||
run: node ./helper/test/index.js
|
||||
|
||||
- name: Build Docs # build docs
|
||||
run: npm run build:docs
|
||||
|
||||
- name: Pages # github pages
|
||||
uses: JamesIves/github-pages-deploy-action@v4.3.0
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: docs
|
||||
|
||||
- name: Release # release
|
||||
uses: release-drafter/release-drafter@v5
|
||||
with:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
publish: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Publish # npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
|
||||
run: node ./helper/scripts/publish.js
|
||||
|
||||
- name: Purge # purge cdn
|
||||
run: |
|
||||
node ./helper/scripts/purge-cdn.js
|
||||
node ./helper/scripts/purge-docs.js
|
||||
Reference in New Issue
Block a user