PyPI Pre-Release #81
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: PyPI Pre-Release | |
on: | |
schedule: | |
# weekly on Sunday | |
- cron: "0 0 * * 0" | |
# as needed by clicking through the github actions UI | |
workflow_dispatch: | |
# we do not want more than one pre-release workflow executing at the same time, ever | |
concurrency: | |
group: pre-release | |
# cancelling in the middle of a release would create incomplete releases | |
# so cancel-in-progress is false | |
cancel-in-progress: false | |
jobs: | |
pre-release: | |
if: github.repository_owner == 'ibis-project' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: install python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: install uv | |
uses: astral-sh/[email protected] | |
with: | |
enable-cache: true | |
- uses: extractions/setup-just@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: compute ibis version | |
id: get-version | |
run: echo "value=$(just bump-version)" | tee -a "$GITHUB_OUTPUT" | |
- name: build wheel and source dist | |
run: uv build | |
if: contains(steps.get-version.outputs.value, '.dev') | |
- name: publish pre-release wheel to test pypi index | |
if: contains(steps.get-version.outputs.value, '.dev') | |
run: uv publish --publish-url https://test.pypi.org/legacy/ | |
env: | |
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }} | |
- name: publish pre-release wheel to pypi | |
if: contains(steps.get-version.outputs.value, '.dev') | |
run: uv publish | |
env: | |
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} |