-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (33 loc) · 1.08 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Build artifact
on:
pull_request:
workflow_dispatch:
env:
APP_NAME: workflow_ocr
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{ env.APP_NAME }}
- name: Read package.json node and npm engines version
uses: skjnldsv/[email protected]
id: versions
continue-on-error: false
with:
path: ${{ env.APP_NAME }}
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
- name: Run build
run: cd ${{ env.APP_NAME }} && make appstore
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ env.APP_NAME }}.tar.gz
path: ${{ env.APP_NAME }}/build/artifacts/appstore/${{ env.APP_NAME }}.tar.gz