Build #27
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: Build | |
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' | |
- name: Install setuptools | |
run: python -m pip install --upgrade pip setuptools | |
- name: Run build script | |
run: python build.py --venv | |
- 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: Install 7z | |
run: | | |
choco install -y 7zip | |
- name: Archive files | |
run: | | |
7z a -mx=9 TAS_${{ steps.get_version.outputs.VERSION }}.7z ./dist | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TAS }} | |
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 }} | |
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 |