diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a78bd54..f378df0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 656a803..c9e85bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "pypowsybl2grid" version = "0.1.0" description = "An integration between Grid2op and PyPowSybl" -authors = ["Geoffroy Jamgotchian "] +authors = ["Geoffroy Jamgotchian "] readme = "README.md" license = "MPL-2.0"