-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (48 loc) · 1.33 KB
/
release_pypi.yml
File metadata and controls
53 lines (48 loc) · 1.33 KB
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
name: Build and upload to PyPI
on:
workflow_dispatch:
release:
types:
- published
jobs:
build:
name: Build universal wheel and source distribution
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install_eitprocessing
with:
dependencies: publishing
python-version: "3.10"
- name: Build wheel and source distribution
run: python -m build
- uses: actions/upload-artifact@v4
with:
path: dist/*
upload_test_pypi:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN_ALIVE }}
repository_url: https://test.pypi.org/legacy/
upload_pypi:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN_ALIVE }}