-
Notifications
You must be signed in to change notification settings - Fork 603
63 lines (50 loc) · 1.83 KB
/
pre-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install poetry
run: python -m pip install 'poetry==1.6.1' poetry-dynamic-versioning
- name: compute ibis version
id: get_version
run: echo "value=$(poetry version)" >> "$GITHUB_OUTPUT"
- name: run some poetry sanity checks
run: poetry check
if: contains(steps.get_version.outputs.value, '.dev')
- name: build wheel and source dist
run: poetry build
if: contains(steps.get_version.outputs.value, '.dev')
- name: add test pypi index
if: contains(steps.get_version.outputs.value, '.dev')
run: poetry config repositories.test-pypi https://test.pypi.org/legacy/
- name: publish pre-release wheel to test pypi index
if: contains(steps.get_version.outputs.value, '.dev')
run: poetry publish -r test-pypi
env:
POETRY_PYPI_TOKEN_TEST_PYPI: ${{ secrets.TEST_PYPI_TOKEN }}
- name: publish pre-release wheel to pypi
if: contains(steps.get_version.outputs.value, '.dev')
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}