Skip to content

Commit

Permalink
Autorelease workflow draft (IDSIA#885)
Browse files Browse the repository at this point in the history
* draft for an autorelease workflow that triggers automatically on a version change and uploads the new version to pypi

* Build sacred wheels before upload to PyPI

* Change trigger to on release

Co-authored-by: Thilo von Neumann <tvn@mail.upb.de>
  • Loading branch information
Qwlouse and thequilo committed Jan 25, 2023
1 parent 2eadffb commit 3ec6d81
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# https://github.com/marketplace/actions/pypi-github-auto-release

name: Auto-publish

on:
release:
types: [published]

jobs:
# Auto-publish when version is increased
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: >-
python -m pip install build --user
- name: Build
run: >-
python -m build --sdist --wheel --outdir dist/ .
- uses: etils-actions/pypi-auto-publish@v1
with:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
parse-changelog: false # requires CHANGELOG.md in appropriate format

0 comments on commit 3ec6d81

Please sign in to comment.