Feat: 增加 check-i18n 方法,优化 sort-json。 #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: npm package js-xcmd CI/CD | |
on: | |
push: | |
branches: [publish] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Init Node.js | |
run: | | |
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN | |
npm publish | |
echo "publish..." | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
result: | |
runs-on: ubuntu-latest | |
needs: publish | |
steps: | |
- name: Result | |
run: | | |
echo "Publish Successful!" |