Build releases #12
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 releases | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
artifact-name: "Linux" | |
artifact-suffix: "" | |
- os: windows-latest | |
artifact-name: "Windows" | |
artifact-suffix: ".exe" | |
- os: macos-latest | |
artifact-name: "MacOS" | |
artifact-suffix: "" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Set up the environment | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pyinstaller | |
pip install . | |
pytest | |
python src/genescape/exe.py --build | |
- name: Extract package version | |
shell: bash | |
run: echo "VERSION=$(python -c 'from genescape import __version__; print(__version__)')" >> $GITHUB_ENV | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GeneScape-${{ env.VERSION }}-${{ matrix.artifact-name }} | |
path: dist/GeneScape-${{ env.VERSION }}-${{ matrix.artifact-name }}.zip |