Skip to content

Create release

Create release #17

# 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 pipenv
python -m pipenv install --ignore-pipfile
- name: Install dependencies of macOS
if: runner.os == 'macOS'
run: |
brew update
brew install libiodbc libpq
- name: Build Windows installer
if: runner.os == 'Windows'
run: pipenv run python setup.py bdist_msi
- name: Build Mac installer
if: runner.os == 'macOS'
run: pipenv run python setup.py bdist_dmg
- name: Upload Windows msi
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: pyopenva-1.2-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]
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R ./dist
- name: Create release in GitHub and uploads attachments
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create v1.2 ./dist/pyopenva-1.2-win64.msi ./dist/pyopenVA.dmg