-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (39 loc) · 1.2 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
48
49
name: Build and Package
on:
push:
branches:
- v2
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up the environment
run: choco install make
- name: Build the project
run: make build SHELL=cmd
- name: Generate unique archive name
id: vars
run: |
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_ENV
echo "UNIQUE_NAME=TF2-GPTChatBot-win-$COMMIT_HASH" >> $GITHUB_ENV
- name: Package the build into a ZIP file
run: |
mkdir output
cp -r frontend/dist/win-unpacked/* output/
powershell Compress-Archive -Path output/* -DestinationPath output/$UNIQUE_NAME.zip
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: $UNIQUE_NAME
path: output/$UNIQUE_NAME.zip