This commit is contained in:
lhx-666-cool
2025-04-25 17:03:25 +08:00
parent 326a2a007c
commit f6cb277519
1677 changed files with 1232721 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
version: 2
aliases:
# -------------------------
# ALIASES: Caches
# -------------------------
- &restore-deps-cache
key: deps-cache-{{ checksum "package-lock.json" }}
- &save-deps-cache
key: deps-cache-{{ checksum "package-lock.json" }}
paths:
- ~/client-js/node_modules
# -------------------------
# ALIASES: Branch Filters
# -------------------------
- &filter-only-master
branches:
only: master
- &filter-only-semantic-pr
branches:
only: /^(pull|dependabot|fix|feat)\/.*$/
defaults: &defaults
working_directory: ~/client-js
docker:
- image: cimg/node:18.13.0
jobs:
test:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-deps-cache
- run: npm install
- run: npm install codecov
- run: npm test
- run: ./node_modules/.bin/codecov
- save_cache: *save-deps-cache
build:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-deps-cache
- run: npm install
- run: npm run build
- save_cache: *save-deps-cache
release:
<<: *defaults
steps:
- checkout
- restore_cache: *restore-deps-cache
- run: npm install
- run: npm run build
- run: npm install semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/npm @semantic-release/commit-analyzer @semantic-release/release-notes-generator @qiwi/semantic-release-gh-pages-plugin
- run: git checkout .
- run: ./node_modules/.bin/semantic-release
- save_cache: *save-deps-cache
workflows:
version: 2
analysis:
jobs:
- test:
filters: *filter-only-semantic-pr
- build:
filters: *filter-only-semantic-pr
release:
jobs:
- test:
filters: *filter-only-master
- build:
filters: *filter-only-master
- hold:
filters: *filter-only-master
type: approval
requires:
- test
- build
- release:
filters: *filter-only-master
context: open-rpc-deployer
requires:
- hold