vega-frontend-monorepo/.github/workflows/publish.yml

64 lines
1.7 KiB
YAML
Raw Normal View History

2021-12-13 10:27:13 +00:00
---
name: Publish
2022-03-08 15:08:15 +00:00
'on':
2021-12-13 10:27:13 +00:00
push:
2021-12-13 10:35:35 +00:00
tags:
2022-03-08 15:08:15 +00:00
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-pre[0-9]+'
2021-12-13 10:27:13 +00:00
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
2021-12-13 10:28:32 +00:00
node-version: [14.x]
2021-12-13 10:27:13 +00:00
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: |
2021-12-13 10:30:15 +00:00
yarn install --frozen-lockfile
2021-12-14 11:32:47 +00:00
- name: Build
run: |
yarn build
2021-12-14 12:16:15 +00:00
- name: Test
run: |
2021-12-14 13:16:41 +00:00
yarn test:coverage
2022-03-08 15:08:15 +00:00
- 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
2021-12-13 10:27:13 +00:00
- name: Push release to npm (public)
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
2021-12-13 10:30:15 +00:00
yarn publish --access public .