-
Notifications
You must be signed in to change notification settings - Fork 252
49 lines (38 loc) · 1.45 KB
/
test-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
name: TestPyPI release
env:
version: 9.0.0
# runs only when a release is published, not on drafts
on:
workflow_dispatch:
jobs:
deploy-packges-and-generate-documentation:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies (SCIPOptSuite)
run: |
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
- name: Setup python 3
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Prepare python environment
run: |
python -m pip install --upgrade pip
python -m pip install wheel cython networkx pytest-cov build
- name: Build package
run: |
python -m build --sdist --no-isolation --outdir dist/
- name: Generate documentation
run: |
sudo apt-get install doxygen graphviz
bash -ex generate-docs.sh "${{ secrets.GITHUB_TOKEN }}" "gh-pages"
- name: "Publish to test.pypi.org"
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TESTPYPI_API_TOKEN }}
verbose: true
packages_dir: dist/