Skip to content

Build releases

Build releases #12

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