Skip to content

v0.9.17.1

v0.9.17.1 #22

Workflow file for this run

name: Build executable
on:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
environment:
name: release
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install pyinstaller
- name: Build package
run: python -m build
- name: Install locally
run: python -m pip install -e .
- name: Build executable as a single file
run: pyinstaller avtdl.py --icon NONE --collect-all avtdl --onefile
- name: Build executable as a folder
run: pyinstaller avtdl.py --icon NONE --collect-all avtdl
- name: Compress the folder
run: |
Compress-Archive -Path dist/avtdl/* -DestinationPath dist/avtdl.zip
Compress-Archive -Path example.config.yml -Update -DestinationPath dist/avtdl.zip
- name: Rename artifacts
run: |
mv dist/avtdl.zip dist/avtdl-${{github.event.release.tag_name}}.zip
mv dist/avtdl.exe dist/avtdl-${{github.event.release.tag_name}}.exe
- name: Upload artifacts
run: |
gh release upload ${{github.event.release.tag_name}} dist/avtdl-${{github.event.release.tag_name}}.zip
gh release upload ${{github.event.release.tag_name}} dist/avtdl-${{github.event.release.tag_name}}.exe
env:
GITHUB_TOKEN: ${{ github.TOKEN }}