vega-frontend-monorepo/.github/workflows/publish.yml
2022-03-10 12:05:41 +00:00

64 lines
1.7 KiB
YAML

---
name: Publish
'on':
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-pre[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- name: Install
run: |
yarn install --frozen-lockfile
- name: Build
run: |
yarn build
- name: Test
run: |
yarn test:coverage
- name: Cypress run
uses: cypress-io/github-action@v2
with:
wait-on: 'http://localhost:4200'
working-directory: apps/explorer-e2e
wait-on-timeout: 120
record: true
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# pass the project ID from the secrets through environment variable
CYPRESS_PROJECT_ID: ${{ secrets.PROJECT_ID }}
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: coverage
path: frontend/automation/coverage
# run: |
# nx e2e explorer-e2e
- name: Push release to npm (public)
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
yarn publish --access public .