feat(components): loading bar added (#490) #220
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-publish | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.15.0 | |
registry-url: https://registry.npmjs.org/ | |
- name: version | |
id: create_version | |
run: | | |
git config user.name $GITHUB_ACTOR | |
git config user.email gh-actions-${GITHUB_ACTOR}@github.com | |
npm version patch | |
git push origin master --force | |
content=`cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g'` | |
echo "::set-output name=version::$content" | |
- name: install dependencies | |
run: yarn | |
- name: run tests | |
run: yarn test | |
- name: create version | |
run: yarn build | |
- name: publish version | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
check-version: true | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ steps.create_version.outputs.version }} | |
release_name: ${{ steps.create_version.outputs.version }} | |
body: ${{ steps.create_version.outputs.version }} | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |