-
Notifications
You must be signed in to change notification settings - Fork 289
59 lines (52 loc) · 1.58 KB
/
build-offline.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
name: Build offline Hedy
on:
# Can be run on-demand
workflow_dispatch: {}
# Runs when 'deploy to prod' runs
workflow_run:
workflows: ["Deploy to hedy.org"]
types: [requested]
branches:
- 'main'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
- name: Set up NodeJS 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: 'Install npx'
run: npm install -g npx
- run: pip install -r requirements.txt
name: 'Python requirements'
- run: doit run _offline
- name: Smoke test the build
run: cd dist && offlinehedy/run-hedy-server --smoketest
- uses: fregante/daily-version-action@v2
name: Create tag if necessary
id: daily-version
- name: Create zip file
# Because we're on Windows
run: |
cd dist/offlinehedy && Compress-Archive -Path . -Destination ../../offlinehedy-${{ steps.daily-version.outputs.version }}.zip
- if: steps.daily-version.outputs.created
name: Create Release
uses: shogo82148/actions-create-release@v1
id: create_release
with:
tag_name: ${{ steps.daily-version.outputs.version }}
generate_release_notes: true
- name: Upload Assets
if: steps.daily-version.outputs.created
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: '*.zip'