Merge pull request #573 from catho/QTM-580 #265
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: Quantum CI - publish | |
on: | |
push: | |
branches: | |
- master | |
- beta | |
jobs: | |
tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Read .nvmrc | |
run: echo NVMRC=$(cat .nvmrc) >> $GITHUB_OUTPUT | |
id: nvm | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '${{ steps.nvm.outputs.NVMRC }}' | |
- name: Install the dependencies | |
run: yarn | |
- name: run storybook | |
run: yarn storybook --smoke-test | |
- name: run unit tests | |
run: yarn test:components | |
- name: run the regression tests | |
run: yarn build:regression | |
publish: | |
needs: tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Read .nvmrc | |
run: echo NVMRC=$(cat .nvmrc) >> $GITHUB_OUTPUT | |
id: nvm | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '${{ steps.nvm.outputs.NVMRC }}' | |
- name: Install the dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: setting npm token | |
run: ./scripts/publish.sh | |
env: | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
- name: Publish package | |
run: yarn semantic-release | |
env: | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_URL: 'https://api.github.com/' | |
- name: Deploy storybook to Github Pages | |
if: ${{ github.ref == 'refs/heads/master' }} | |
run: yarn deploy-storybook -- --ci | |
env: | |
GH_TOKEN: catho:${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |