67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
name: Client
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
client-build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./client
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v2.1.5
|
|
with:
|
|
node-version: 14.x
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- name: cache node_modules
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Installling dependencies
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: yarn
|
|
|
|
- name: Lint
|
|
run: yarn lint
|
|
|
|
- name: Build
|
|
run: yarn build
|
|
env:
|
|
VITE_SENTRY_DSN: https://examplePublicKey@o0.ingest.sentry.io/0
|
|
VITE_NODE_ENV: development
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v1
|
|
with:
|
|
languages: javascript
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v1
|
|
|
|
- name: Create Sentry release
|
|
uses: getsentry/action-release@v1
|
|
env:
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT_CLIENT }}
|
|
with:
|
|
environment: production
|
|
set_commits: skip
|
|
version: ${{ github.sha }} |