Merge pull request #588 from catho/QTM-786 #278
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@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.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@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.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 }} |