Update links to storybook #9
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 npm package | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
branches: | |
- master | |
jobs: | |
pre-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Bump version and get tag | |
id: version_bump | |
uses: anothrNick/github-tag-action@1.39.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_BRANCHES: 'master,v2' | |
DEFAULT_BUMP: 'patch' | |
WITH_V: true | |
publish: | |
runs-on: ubuntu-latest | |
needs: pre-publish | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
# Setup .npmrc file to publish to GitHub Packages | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::$( git describe --tag --abbrev=0 ) | |
- run: git describe --tag --abbrev=0 | |
- run: npm --no-git-tag-version version $( git describe --tag --abbrev=0 ) | |
- run: npm ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }} | |
- run: npm run build | |
- name: Run unit tests | |
run: npm test | |
- name: publish-npm | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@shenato' | |
- name: Prefix with scope | |
run: npm run prepublishGit | |
- name: publish-git | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: npm run build-storybook | |
- name: Deploy to Netlify | |
uses: nwtgck/actions-netlify@v1.2 | |
with: | |
publish-dir: './devapp-build' | |
production-branch: master | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: false | |
enable-commit-comment: true | |
overwrites-pull-request-comment: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 |