Repository navigation
80 lines (69 loc) · 1.87 KB
/
Copy pathdist-python.yml
File metadata and controls
80 lines (69 loc) · 1.87 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
name: Python Dist
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+.post[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+[a-b][0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
workflow_dispatch:
pull_request:
workflow_call:
inputs:
ref:
required: true
type: string
concurrency:
group: dist-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -eux {0}
jobs:
make_dist:
name: Make Dist
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
# Build sdist on lowest supported Python
python-version: '3.11'
- name: Install python requirements
run: |
python -m pip install uv rust-just build twine
- name: Validate pyproject.toml
run: |
python -m pip install 'validate-pyproject[all]'
validate-pyproject pyproject.toml
- name: Build Dist
run: |
python -m build .
- name: Test SDist
run: |
python -m twine check --strict dist/*.*
python -m pip install dist/*.gz
cd ..
python -c "from flask_pymongo import PyMongo"
- uses: actions/upload-artifact@v7
with:
name: "dist"
path: ./dist/*.*
collect_dist:
runs-on: ubuntu-latest
needs: [make_dist]
name: Download Dist
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v8
- name: Flatten directory
working-directory: .
run: |
find . -mindepth 2 -type f -exec mv {} . \;
find . -type d -empty -delete
- uses: actions/upload-artifact@v7
with:
name: all-dist-${{ github.run_id }}
path: "./*"