v13.0.0 #447
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: Publish to npm | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: npm test | |
- run: npm run build | |
- run: git config --global user.name "GitHub CD bot" | |
- run: git config --global user.email "[email protected]" | |
- run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version | |
- run: git add . && git commit -m "[Release] ${{ github.event.release.tag_name }}" | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: react-ace.min.js | |
path: dist/react-ace.min.js | |
- run: git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |