-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (73 loc) · 2.61 KB
/
ci-app-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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build App
on:
push:
branches: [ '*' ]
jobs:
build:
runs-on: windows-latest
env:
app-dir: ./App
desktop-dir: ./DesktopApp
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.300'
# build app
- run: echo "REACT_APP_API_ROOT=http://localhost:5000`n" >> .env
working-directory: ${{env.app-dir}}
- run: npm ci
working-directory: ${{ env.app-dir }}
- run: npm run build:tsc
working-directory: ${{ env.app-dir }}
- name: Build App
run: npx cross-env NODE_ENV=production PUBLIC_URL=/app/ npm run build
working-directory: ${{ env.app-dir }}
- name: Build Video Renderer Module
run: npx cross-env PUBLIC_URL=/app/renderer npm run build:renderer
working-directory: ${{ env.app-dir }}
- name: Build Video Render Script
run: npm run build:render-script
working-directory: ${{ env.app-dir }}
# build desktop app
- run: ./build-releases.ps1
working-directory: ${{env.desktop-dir}}/scripts
- run: ./build-releases.sh
working-directory: ${{env.desktop-dir}}/scripts
shell: bash
- run: ./zip-releases.ps1
working-directory: ${{env.desktop-dir}}/scripts
- run: ls ./DesktopApp/bin/Release
# release
- run: git reset --hard
- run: npm version patch --git-tag-version false
- name: commit version bump
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "bump version to %s [skip ci]" -a
- run: git tag $(node -p -e "require('./package.json').version")
- run: echo "NPM_PACKAGE_VERSION=$(node -p -e "require('./package.json').version")" >> $env:GITHUB_ENV
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.OUR_GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{env.NPM_PACKAGE_VERSION}}
files: |
${{env.desktop-dir}}/bin/Release/win-x64.zip
${{env.desktop-dir}}/bin/Release/linux-x64.zip
${{env.desktop-dir}}/bin/Release/osx-x64.zip
${{env.desktop-dir}}/bin/Release/osx-x64-self-contained.zip
${{env.desktop-dir}}/bin/Release/win-x64-self-contained.zip