Skip to content

Commit

Permalink
add whell upload upon release
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocerrone committed Nov 28, 2024
1 parent 8226a8f commit bd1c3dc
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion project/.github/workflows/build_and_test.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,42 @@ jobs:
fi

- name: Test core library with pytest
run: python -m pytest tests
run: python -m pytest tests

deploy:
name: Deploy
needs: test
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
runs-on: ubuntu-latest

permissions:
# IMPORTANT: this permission is mandatory for trusted publishing on PyPi
# see https://docs.pypi.org/trusted-publishers/
id-token: write
# This permission allows writing releases
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: 👷 Build
run: |
python -m pip install build
python -m build

- name: 🚢 Publish to PyPI
# TODO remove the "if: false" line when the package is ready for pypi release
if: false
uses: pypa/gh-action-pypi-publish@release/v1

- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: './dist/*'

0 comments on commit bd1c3dc

Please sign in to comment.