-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (85 loc) · 2.85 KB
/
deploy.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
on:
push:
branches:
- master
jobs:
call-test-workflow:
uses: wvangeit/osparc-filecomms/.github/workflows/test.yml@master
wheels:
name: building wheel
runs-on: ubuntu-latest
needs:
call-test-workflow
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools build
- name: Bump version and push tag
id: tag_version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DEFAULT_BUMP: patch
- name: Build wheel
run: python -m build
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-ubuntu-latest-py3.11
path: ./dist/*.whl
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
artifacts: ./dist/*.whl
test-pypi:
name: Publish wheels on Test PyPI
runs-on: ubuntu-latest
needs:
- wheels
environment:
name: osparc-filecomms
url: https://test.pypi.org/p/osparc-filecomms
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
pypi:
name: Publish wheels on PyPI
runs-on: ubuntu-latest
needs:
- test-pypi
environment:
name: osparc-filecomms
url: https://pypi.org/p/osparc-filecomms
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1