forked from blackjax-devs/blackjax
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.58 KB
/
nightly.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
name: Nightly
on:
push:
branches: [main]
jobs:
build_and_publish:
name: Build and publish on PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Update pyproject.toml
# Taken from https://github.com/aesara-devs/aesara/pull/1375
run: |
curl -sSLf https://github.com/TomWright/dasel/releases/download/v2.0.2/dasel_linux_amd64 \
-L -o /tmp/dasel && chmod +x /tmp/dasel
/tmp/dasel put -f pyproject.toml project.name -v blackjax-nightly
/tmp/dasel put -f pyproject.toml tool.setuptools_scm.version_scheme -v post-release
/tmp/dasel put -f pyproject.toml tool.setuptools_scm.local_scheme -v no-local-version
- name: Build the sdist and wheel
run: |
python -m pip install -U pip
python -m pip install build
python -m build
- name: Check sdist install and imports
run: |
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install ../dist/blackjax-nightly-*.tar.gz
venv-sdist/bin/python -c "import blackjax"
- name: Check wheel install and imports
run: |
mkdir -p test-wheel
cd test-wheel
python -m venv venv-wheel
venv-wheel/bin/python -m pip install ../dist/blackjax_nightly-*.whl
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.PYPI_NIGHTLY_TOKEN }}