Skip to content

Workflow file for this run

name: publish executable file to release page
# releaseページにWindows用の実行ファイルをアップロードする。windowsはpython環境の構築に少し手間がかかるので、実行可能ファイルを用意する。
on:
release:
types:
- published
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Poetry and dependencies
run: |
python -m pip install --upgrade pip "poetry<1.9"
poetry install --only main,publish
- name: Create executable file with pyinstaller and zip
run: |
poetry run pyinstaller annofabcli/__main__.py --name annofabcli --add-data "annofabcli/data:annofabcli/data"
pushd dist
Compress-Archive -Path annofabcli -DestinationPath annofabcli-windows.zip
popd
- name: Upload a executable file to GitHub Releases
uses: softprops/action-gh-release@v2
with:
files: |
dist/annofabcli-windows.zip