-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (69 loc) · 1.75 KB
/
dist-python.yml
File metadata and controls
79 lines (69 loc) · 1.75 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
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
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-python@v6
with:
# Build sdist on lowest supported Python
python-version: '3.10'
- name: Install python requirements
run: |
python -m pip install uv rust-just build twine
- 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 "import django_mongodb_extensions"
- uses: actions/upload-artifact@v7
with:
name: "dist"
path: ./dist/*.*
collect_dist:
runs-on: ubuntu-latest
needs: [make_dist]
name: Download Dist
permissions:
contents: read
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: "./*"