Skip to content

💻 Offline Hedy for Windows #49

💻 Offline Hedy for Windows

💻 Offline Hedy for Windows #49

Workflow file for this run

name: Build offline Hedy
on:
# Can be run on-demand
workflow_dispatch: {}
pull_request: {}
# 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: actions/upload-artifact@v2
name: Upload worfklow artifacts (remove me)
with:
path: dist/*
- 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'