Cocos Publish Package to NPM #2
Workflow file for this run
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: Cocos Publish Package to NPM | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
- name: npm install and test | |
run: | | |
npm ci | |
npm test | |
- name: LKG, clean, and pack | |
run: | | |
gulp LKG | |
gulp clean | |
npm pack ./ | |
mv cocos-typescript-*.tgz typescript.tgz | |
- name: Upload built tarfile | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tgz | |
path: typescript.tgz | |
- uses: JS-DevTools/npm-publish@4b07b26a2f6e0a51846e1870223e545bae91c552 | |
if: github.event_name == 'release' | |
with: | |
token: ${{ secrets.NPM_PUBLISH_FOR_PUBLIC_REPO }} | |
registry: "https://registry.npmjs.org" |