-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (68 loc) · 2.03 KB
/
publish-testpypi.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
64
65
66
67
68
69
70
71
---
# This workflow will install Python dependencies, run tests
name: Publish on TestPyPI
on: push
jobs:
build-n-publish:
# needs: test
name: Build and upload release to TestPyPI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: True
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
environment:
name: testpypi
url: https://test.pypi.org/p/OTAnalytics-EXAMPLE-TEST-DISTRIBUTION
permissions:
actions: read
contents: read
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Check-out platomo-build repository
uses: actions/checkout@v4
with:
repository: platomo/platomo-build
token: ${{ secrets.PLATOMO_BUILDER_ACCESS }}
path: platomo-build
- name: Install builder dependencies
run: |
cd platomo-build
python -m pip install --upgrade pip
if [ -f "requirements.txt" ]; then
pip install -r requirements.txt
fi
if [ -f "requirements-dev.txt" ]; then
pip install -r requirements-dev.txt
fi
- name: Build release assets
run: python ./platomo-build/build.py --package_version 0.0.1
- name: Remove File
uses: JesseTG/rm@v1.0.3
with:
path: dist/
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true