v0.2.0 #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Publishing derived from https://docs.pypi.org/trusted-publishers/ | |
# Building derived from https://github.com/Farama-Foundation/Gymnasium/blob/main/.github/workflows/build-publish.yml | |
on: | |
release: | |
types: | |
- published | |
name: release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: python -m pip install --upgrade pip setuptools build | |
- name: Build sdist and wheels | |
run: python -m build | |
- name: Store wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dist | |
pypi-publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- name: Download dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |