Skip to content

Commit

Permalink
Publish on PyPi (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
  • Loading branch information
geofjamg authored Jan 16, 2025
1 parent f0c8895 commit d86a683
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ jobs:
build:
runs-on: ubuntu-20.04

environment:
name: pypi
url: https://pypi.org/p/pypowsybl2grid

permissions:
id-token: write

steps:
- name: Install Ubuntu packages
env:
Expand All @@ -19,12 +26,6 @@ jobs:
sudo apt -y install maven python3.9 python3.9-dev python3.9-venv pipx
pipx install poetry
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '17'
distribution: 'graalvm'

- name: Checkout sources
uses: actions/checkout@v4

Expand All @@ -37,11 +38,6 @@ jobs:
- name: Run tests
run: poetry run pytest

- name: Copy PyPowSyBl wheel
run: cp $(find $HOME/.cache/pypoetry/artifacts/ -name pypowsybl*.whl) dist/

- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: pypowsybl2grid-wheels
path: dist/*.whl
- name: Publish on PyPi
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pypowsybl2grid"
version = "0.1.0"
description = "An integration between Grid2op and PyPowSybl"
authors = ["Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>"]
authors = ["Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>"]
readme = "README.md"
license = "MPL-2.0"

Expand Down

0 comments on commit d86a683

Please sign in to comment.