Skip to content

Merge pull request #57 from g-loot/feature/theme-roundheaders #64

Merge pull request #57 from g-loot/feature/theme-roundheaders

Merge pull request #57 from g-loot/feature/theme-roundheaders #64

Workflow file for this run

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: '12.x'
registry-url: 'https://registry.npmjs.org'
scope: '@g-loot'
- 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: '12.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@g-loot'
- 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