-
Notifications
You must be signed in to change notification settings - Fork 137
47 lines (41 loc) · 1.02 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
42
43
44
45
46
47
name: Build moviepilot frontend
on:
workflow_dispatch:
push:
branches:
- main
paths:
- package.json
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release version
id: release_version
run: |
frontend_version=$(jq -r '.version' package.json)
echo "frontend_version=v$frontend_version" >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- name: Build frontend
id: build_frontend
run: |
yarn
yarn build
zip -r dist.zip dist
- name: Generate Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.frontend_version }}
name: ${{ env.frontend_version }}
draft: false
prerelease: false
files: |
dist.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}