-
-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (38 loc) · 1.21 KB
/
test_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
name: test_build
on:
workflow_dispatch:
inputs:
platform:
description: 'Platform'
required: true
default: 'windows-latest'
type: choice
options:
- windows-latest
- ubuntu-latest
jobs:
# Build and upload as artifacts
build:
name: Building for tests on ${{ inputs.platform }}
runs-on: ${{ inputs.platform }}
env:
PACKAGE_NAME: ${{ fromJSON('{"windows-latest":"ufc-ripper-win-x64.zip","ubuntu-latest":"ufc-ripper-linux-x64.zip"}')[ inputs.platform ] }}
TARGET_PLATFORM: ${{ fromJSON('{"windows-latest":"win","ubuntu-latest":"linux"}')[ inputs.platform ] }}
steps:
# Checkout repo
- uses: actions/checkout@v3
# Install node
- uses: actions/setup-node@v3
with:
node-version: 20
# Install deps
- run: npm install --no-audit
# Package app
- name: Package for distribution
run: npm run pack-${{ env.TARGET_PLATFORM }}
# Upload build artifact
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ufc-ripper-test-build-${{ github.run_number }}-artifacts
path: package/artifacts/${{ env.PACKAGE_NAME }}