-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (36 loc) · 1.07 KB
/
build-react.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
42
43
44
name: Build React App and Add to Release
run-name: |
Build React App${{ github.event_name == 'release' && ' and add to Release' || '' }}
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
working-directory: ./web_client
run: npm install
- name: Build React App
working-directory: ./web_client
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ./web_client/dist
path: ./cocktailberry_web_client.tar.gz
- name: Upload binaries to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./web_client/dist
asset_name: cocktailberry_web_client.tar.gz
tag: ${{ github.event.release.tag_name }}