forked from gijzelaerr/python-snap7
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (98 loc) · 3.08 KB
/
Copy pathpublish-test-pypi.yml
File metadata and controls
109 lines (98 loc) · 3.08 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Publish distribution 📦 to Test PyPI
on:
workflow_dispatch:
jobs:
publish-to-testpypi:
environment:
name: testpypi
url: https://test.pypi.org/p/python-snap7
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
name: Publish distribution 📦 to TestPyPI
runs-on: ubuntu-latest
steps:
- name: "Download macOS artifacts"
uses: dawidd6/action-download-artifact@v6
with:
workflow: osx-build-test-amd64.yml
name: dist-osx-universal
path: dist
- name: "Download Linux/amd64 artifacts"
uses: dawidd6/action-download-artifact@v6
with:
workflow: linux-build-test-amd64.yml
name: dist-linux-amd64
path: dist
- name: "Download Linux/arm64 artifacts"
uses: dawidd6/action-download-artifact@v6
with:
workflow: linux-build-test-arm64.yml
name: dist-linux-arm64
path: dist
- name: "Download Windows artifacts"
uses: dawidd6/action-download-artifact@v6
with:
workflow: windows-build-test-amd64.yml
name: dist-windows-amd64
path: dist
- name: "Download source artifacts"
uses: dawidd6/action-download-artifact@v6
with:
workflow: source-build.yml
name: dist-source
path: dist
- name: Combine artifacts
uses: actions/upload-artifact@v4
with:
name: dist-combined
path: dist
- name: show dist layout
run: find dist
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
test-pypi-packages:
runs-on: ${{ matrix.os }}
needs: publish-to-testpypi
strategy:
matrix:
os: ["ubuntu-24.04", "ubuntu-22.04", "macos-14", "macos-15"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: install python-snap7
run: |
uv venv
uv pip install --extra-index-url https://test.pypi.org/simple/ python-snap7[test]
test-pypi-package-windows:
runs-on: ${{ matrix.os }}
needs: publish-to-testpypi
strategy:
matrix:
os: ["windows-2025", "windows-2022"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: install python-snap7
run: |
uv pip install --extra-index-url https://test.pypi.org/simple/ python-snap7[test]