Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-cn committed Mar 1, 2024
1 parent 0983f3c commit 7518685
Show file tree
Hide file tree
Showing 44 changed files with 2,631 additions and 310 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Don't allow people to merge changes to these generated files, because the result
# may be invalid. You need to run "rush update" again.
pnpm-lock.yaml merge=text
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary

# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
# may also require a special configuration to allow comments in JSON.
#
# For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088
#
*.json linguist-language=JSON-with-Comments
41 changes: 35 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
name: CI
name: Changesets
on:
- push
push:
branches:
- main
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
codeCov:
version:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: checkout code repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: latest
- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: install dependencies
run: pnpm install
env:
GITHUB_AUTH_TOKEN: ${{secrets.PERSONAL_TOKEN}}
- name: create and publish versions
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Deploy Docs
name: new_ci.yml Deploy Docs
on:
workflow_dispatch: {}
push:
Expand Down Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install
run: npm install
env:
NODE_AUTH_TOKEN: ${{secrets.PERSONAL_TOKEN}}
GITHUB_AUTH_TOKEN: ${{secrets.PERSONAL_TOKEN}}
- name: Build
run: npm run docs:build
- name: Upload artifact
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,8 @@ jobs:
uses: pnpm/action-setup@v3
with:
version: latest
- name: Bump version
run: npm run bump
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
- name: Install Dependencies
run: pnpm install
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.PERSONAL_TOKEN}}
- name: Build
run: pnpm run build
if: ${{ steps.release.outputs.release_created }}
- name: Publish
run: pnpm publish -r --access public --no-git-checks
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
82 changes: 78 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,84 @@
/**/*/lib
/node_modules
/.idea
/**/*/node_modules
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# OS X temporary files
.DS_Store

# IntelliJ IDEA project files; if you want to commit IntelliJ settings, this recipe may be helpful:
# https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
.idea/
*.iml

# Rush temporary files
common/deploy/
common/temp/
common/autoinstallers/*/.npmrc
**/.rush/temp/
*.lock

# Heft temporary files
.cache
.heft
# project test files

package-lock.json
/test/.*.env
/test/*.yaml
test/*.config.js
test/*.config.ts
/test/data

5 changes: 4 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
//npm.pkg.github.com/:_authToken=${GITHUB_AUTH_TOKEN}
@icqqjs:registry=https://npm.pkg.github.com
always-auth=true
registry=https://registry.npmmirror.com/

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zhin",
"version": "2.4.6",
"version": "3.0.0",
"main": "lib/index.js",
"bin": "./bin.js",
"scripts": {
Expand Down
Loading

0 comments on commit 7518685

Please sign in to comment.