Skip to content

5th Order Synchronous Generator (#230) #49

5th Order Synchronous Generator (#230)

5th Order Synchronous Generator (#230) #49

name: Publish dpsim package to PyPi
on:
push:
branches:
- master
tags:
- '*'
jobs:
build-and-publish-sdist:
name: Build dpsim sdist and publish to PyPi
runs-on: ubuntu-latest
container: sogno/dpsim:dev
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build dpsim source dist
shell: bash
run: python -m build --sdist --outdir dist/
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
build-and-publish-wheels:
name: Build dpsim wheels and publish to PyPi
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
# - name: Build manylinux docker image # Remove this step as soon as the image is published on docker hub
# shell: bash
# run: docker build . --file packaging/Docker/Dockerfile.manylinux -t sogno/dpsim:manylinux
- name: Build dpsim wheels for all supported python versions
uses: pypa/[email protected]
with:
output-dir: dist
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}