Automatic release #60
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
name: "Automatic release" | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
automatic_release: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.3 | |
- name: Install dev dependencies | |
run: poetry install | |
- name: Get latest unreleased bun version | |
run: poetry run python src/get_latest_unreleased_bun_version.py | |
- name: We are up to date | |
if: ${{ hashFiles('LATEST_UNRELEASED_BUN_VERSION.txt') == '' }} | |
run: echo "We are up to date" | |
- name: Build the wheel | |
if: ${{ hashFiles('LATEST_UNRELEASED_BUN_VERSION.txt') != '' }} | |
run: poetry run python src/make_wheels.py latest | |
- name: Publish on PyPI | |
if: ${{ hashFiles('LATEST_UNRELEASED_BUN_VERSION.txt') != '' }} | |
run: poetry run twine upload dist/* | |
env: | |
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
- name: New release published | |
if: ${{ hashFiles('LATEST_UNRELEASED_BUN_VERSION.txt') != '' }} | |
run: | | |
cat LATEST_UNRELEASED_BUN_VERSION.txt |