-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (50 loc) · 1.75 KB
/
pipsource.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
name: Deploy pip source package (wip)
on:
workflow_dispatch:
inputs:
wip:
description: 'Publish work in progress package.'
required: false
default: 'true'
jobs:
build_packages:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install prerequisites
run: |
sudo apt-get install python3 python3-pip
pip3 install --user --upgrade --force-reinstall pip
python3 -m pip install --user --upgrade setuptools wheel
- name: Install prerequisites (wip)
if: ${{ github.event.inputs.wip == 'true' }}
run: |
python3 -m pip install --user --extra-index-url https://test.pypi.org/simple/ clingo
- name: Install prerequisites (release)
if: ${{ github.event.inputs.wip == 'false' }}
run: |
python3 -m pip install --user clingo
- name: Build source package (wip)
if: ${{ github.event.inputs.wip == 'true' }}
run: python3 .github/pipsource.py
- name: Publish package to TestPyPI (wip)
if: ${{ github.event.inputs.wip == 'true' }}
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist/
repository_url: https://test.pypi.org/legacy/
- name: Build source package (release)
if: ${{ github.event.inputs.wip == 'false' }}
run: python3 .github/pipsource.py --release
- name: Publish package to TestPyPI (release)
if: ${{ github.event.inputs.wip == 'false'}}
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN_RELEASE }}
packages_dir: dist/