Skip to content

Release Windows Exec #35

Release Windows Exec

Release Windows Exec #35

Workflow file for this run

name: Release Windows Exec
on:
release:
types: [created, edited]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel pyinstaller
pip install .
- name: Build exec
id: build-exec
run: |
pyinstaller --clean -y spcal.spec
echo "::set-output name=version::$(python -c "from importlib.metadata import version; print(version('spcal'))")"
- name: Upload binary
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/spcal_${{ steps.build-exec.outputs.version }}.exe
asset_name: spcal_${{ steps.build-exec.outputs.version }}.exe
asset_content_type: application/octet-stream