Skip to content

updated GH_TOKEN and testing github action #398

updated GH_TOKEN and testing github action

updated GH_TOKEN and testing github action #398

# 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}}