Skip to content

Build package (Windows) #24

Build package (Windows)

Build package (Windows) #24

Workflow file for this run

name: Build package (Windows)
on:
release:
types: [created]
workflow_dispatch:
jobs:
publish:
runs-on: windows-latest
steps:
- name: Create packages directory
run: mkdir packages
- uses: actions/checkout@v2
- name: Get nuget packages
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
- name: Install nuget packages
run: |
nuget install DHI.DFS -OutputDirectory packages -Source "https://api.nuget.org/v3/index.json"
nuget install DHI.Projections -OutputDirectory packages -Source "https://api.nuget.org/v3/index.json"
- name: Install packages into directory
shell: cmd
run: .\BuildNativeBin.bat
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest setuptools twine wheel
- name: Install mikecore-python
run: |
pip install .
- name: Test with pytest
run: |
pytest
- name: Build python package
run: python setup.py bdist_wheel
- name: Upload python package
uses: actions/upload-artifact@v2.2.3
with:
name: mikecore
path: dist
#- name: Publish to pypi
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# twine upload --skip-existing dist/*