From 98c55f0f9905189e31ced0cd6f14505722e47c85 Mon Sep 17 00:00:00 2001 From: Konstantin Wrede Date: Thu, 18 Jul 2024 13:46:32 +0200 Subject: [PATCH] workflow for publishing pypi package from release --- .github/workflows/publish.yml | 33 +++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..549ebba --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Upload Python Package to PyPI when a Release is Created + +on: + release: + types: [created] + +jobs: + pypi-publish: + name: Publish release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/fmugym + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install Poetry + run: | + python -m pip install --upgrade pip + pip install poetry + - name: Configure Poetry + run: | + poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN_FMUGYM }} + - name: Build and publish to PyPI + + run: | + poetry build -vvv + poetry publish -vvv diff --git a/README.md b/README.md index 62deebd..b52f8d7 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ Proceed with training the agent and save the resulting policy. ### 6 Evaluate performance of policy with inference Running one inference episode with the trained agent while capturing trajectories. To statistically assess the trained agent's performance, the optimized policy can be deployed for multiple randomized episodes to evaluate the results. + DiagramInference ## License