updated GH_TOKEN and testing github action #398
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
name: Hawa Publish Package Push | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- run: | | |
if [ -e 'package-lock.json' ]; then | |
npm ci | |
else | |
npm install | |
fi | |
npm run build-storybook | |
npm run deploy-storybook -- --ci | |
env : | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
publish-npm: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- run: | | |
if [ -e 'package-lock.json' ]; then | |
npm ci | |
else | |
npm install | |
fi | |
- run: npm run build-lib | |
- run: npm run build:styles | |
- run: npm run generate-css | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |