Skip to content

v0.6.4

v0.6.4 #10

Workflow file for this run

name: Upload Python Package
on:
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'
- name: Compile wrapper on Windows
if: startsWith(runner.os, 'Windows')
run: |
mkdir tmp-build
cd tmp-build
cmake $Env:github_workspace/pythonfmu/pythonfmu-export -DCMAKE_BUILD_TYPE=Release -A x64
cmake --build . --config Release
cd ..
- name: Compile wrapper on Linux / macOS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
run: |
mkdir tmp-build
cd tmp-build
cmake $GITHUB_WORKSPACE/pythonfmu/pythonfmu-export -DCMAKE_BUILD_TYPE=Release
cmake --build .
cd ..
- name: Archive wrapper library
uses: actions/upload-artifact@v4
with:
name: lib-wrapper-${{ matrix.os }}
path: pythonfmu/resources
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Download wrappers
uses: actions/download-artifact@v4
with:
pattern: lib-wrapper-*
path: pythonfmu/resources
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PYTHONFMU_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*