Old-Build-Method-Windows #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Old-Build-Method-Windows | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11.9" | |
- name: Pip Install Requirements-Dev | |
run: python -m pip install -r requirements-dev-windows.txt | |
- name: Sanity Check - List pip modules | |
run: python -m pip list | |
#- name: Install setuptools | |
# run: python -m pip install --upgrade pip setuptools | |
# | |
## This should hopefully work | |
#- name: Cache pip modules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ~\AppData\Local\pip\Cache | |
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
# restore-keys: | | |
# ${{ runner.os }}-pip- | |
# | |
#- name: Install dependencies | |
# run: python -m pip install -r requirements.txt | |
# | |
#- name: Sanity Check - List pip modules | |
# run: python -m pip list | |
- name: Run build script | |
run: python build.py --venv | |
- name: Get the date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TAS }} | |
with: | |
tag_name: TAS_${{ steps.date.outputs.date }} | |
release_name: TAS_${{ steps.date.outputs.date }} | |
draft: true | |
- name: Compress main directory | |
run: | | |
cd ${{ github.workspace }}/dist/main/ | |
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m ../../TAS_${{ steps.get_version.outputs.VERSION }}.7z * | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TAS }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: TAS_${{ steps.get_version.outputs.VERSION }}.7z | |
asset_name: TAS_${{ steps.get_version.outputs.VERSION }}.7z | |
asset_content_type: application/x-7z-compressed |