Skip to content

Create release

Create release #10

# This workflow will install Python dependencies, run cx-Freeze to create an installer file, then add it as a release.
name: Create release
permissions:
contents: write
on: [workflow_dispatch]
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
python-version: ["3.11"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build Windows installer
if: runner.os == 'Windows'
run: python setup.py bdist_msi
- name: Build Mac installer
if: runner.os == 'macOS'
run: python setup.py bdist_dmg
- name: Upload Windows msi
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: pyopenva-1.1-win64.msi
path: ./dist/*.msi
- name: Upload MacOS dmg
uses: actions/upload-artifact@v4
if: runner.os == 'macOS'
with:
name: pyopenVA.dmg
path: ./build/*.dmg
create_release:
needs: [build]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: pyopenva*
path: dist
merge-multiple: true
- name: Create release in GitHub and uploads attachments
run: gh release create v1.1 ./dist/pyopenva-1.1-win64.msi ./dist/pyopenVA.dmg
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash