Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub workflow to run build:prod #266

Merged
merged 2 commits into from Nov 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,49 @@
name: Build Production

on:
pull_request:
push:
branches:
- develop
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest

name: build-prod
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
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)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- run: yarn install
- run: yarn lint
- name: Build production
run: yarn build:prod

- name: Archive production zip file
uses: actions/upload-artifact@v2
with:
name: joule.zip
path: dist-prod/joule-*.zip

- name: Archive production files
uses: actions/upload-artifact@v2
with:
name: joule
path: dist-prod/