Skip to content

Build

Build #5

Workflow file for this run

name: Build
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run build script
run: python build.py
- name: Extract version
id: get_version
run: |
echo ::set-output name=VERSION::$(python -c "from main import scriptVersion; print(scriptVersion)")
- name: Print version
id: print_version
run: |
python -c "from main import scriptVersion; print(scriptVersion)"
- name: Archive files
uses: theapache64/[email protected]
with:
path_to_archive: ./dist
archive_name: TAS_${{ steps.get_version.outputs.VERSION }}.rar
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS_TOKEN }}
with:
tag_name: TAS_${{ steps.get_version.outputs.VERSION }}
release_name: TAS_${{ steps.get_version.outputs.VERSION }}
draft: true
- name: Upload Release Asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TAS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./TAS_${{ steps.get_version.outputs.VERSION }}.rar
asset_name: TAS_${{ steps.get_version.outputs.VERSION }}.rar
asset_content_type: application/x-rar-compressed