forked from fybrik/fybrik
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (73 loc) · 2.36 KB
/
python-publish.yaml
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
64
65
66
67
68
69
70
71
72
73
name: python-publish
on:
workflow_dispatch:
inputs:
logging-version:
required: true
default: 'do-not-publish'
vault-version:
required: true
default: 'do-not-publish'
tls-version:
required: true
default: 'do-not-publish'
transformation-version:
required: true
default: 'do-not-publish'
pypi-repository-url:
required: true
default: 'https://upload.pypi.org/legacy/'
pypi-user:
required: true
default: '__token__'
jobs:
python-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build logging package
run: |
if [ ${{ github.event.inputs.logging-version }} == "do-not-publish" ]
then
echo "do not publish logging library"
else
VERSION=${{ github.event.inputs.logging-version }} python -m build ./python/logging --outdir ./dist
fi
- name: Build vault package
run: |
if [ ${{ github.event.inputs.vault-version }} == "do-not-publish" ]
then
echo "do not publish vault library"
else
VERSION=${{ github.event.inputs.vault-version }} python -m build ./python/vault --outdir ./dist
fi
- name: Build tls package
run: |
if [ ${{ github.event.inputs.tls-version }} == "do-not-publish" ]
then
echo "do not publish tls library"
else
VERSION=${{ github.event.inputs.tls-version }} python -m build ./python/tls --outdir ./dist
fi
- name: Build transformation package
run: |
if [ ${{ github.event.inputs.transformation-version }} == "do-not-publish" ]
then
echo "do not publish transformation library"
else
VERSION=${{ github.event.inputs.transformation-version }} python -m build ./python/transformation --outdir ./dist
fi
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ github.event.inputs.pypi-user }}
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: ${{ github.event.inputs.pypi-repository-url }}