jokes-bapak2/.github/workflows/client.yml

68 lines
1.7 KiB
YAML
Raw Normal View History

2021-07-09 06:19:58 +00:00
name: Client
2021-07-23 15:39:23 +00:00
on:
2021-07-09 06:19:58 +00:00
push:
2021-07-16 09:10:40 +00:00
branches: [ "master" ]
2021-07-09 06:19:58 +00:00
jobs:
client-build:
name: Build
2021-07-09 13:31:15 +00:00
runs-on: ubuntu-latest
2021-07-09 06:19:58 +00:00
defaults:
run:
working-directory: ./client
2021-07-23 15:39:23 +00:00
2021-07-09 06:19:58 +00:00
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2.1.5
with:
2021-07-09 13:31:15 +00:00
node-version: 14.x
2021-07-23 15:39:23 +00:00
2021-07-09 06:19:58 +00:00
- 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-
2021-07-17 11:27:26 +00:00
2021-07-09 06:19:58 +00:00
- name: Installling dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: Lint
run: yarn lint
2021-07-23 15:39:23 +00:00
2021-07-09 06:19:58 +00:00
- name: Build
run: yarn build
2021-07-15 11:06:49 +00:00
env:
VITE_SENTRY_DSN: https://examplePublicKey@o0.ingest.sentry.io/0
VITE_NODE_ENV: development
2021-07-17 13:27:09 +00:00
VITE_API_ENDPOINT: https://jokesbapak2.herokuapp.com/v1
2021-07-09 06:19:58 +00:00
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: javascript
- name: Perform CodeQL Analysis
2021-07-15 06:51:39 +00:00
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
2021-07-15 10:39:01 +00:00
version: ${{ github.sha }}