-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (67 loc) · 1.95 KB
/
update.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
name: Update python.def
on:
workflow_dispatch:
workflow_run:
workflows:
- Collect pythonXY.dll
types:
- completed
schedule:
# Run every week
- cron: '0 0 * * 0'
jobs:
update-stable-abi:
name: Update stable_abi.toml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch latest stable_abi.toml
run: |
curl https://raw.githubusercontent.com/python/cpython/main/Misc/stable_abi.toml > stable_abi.toml
- name: Install Python TOML parser
run: |
pip install tomli
- name: Parse stable_abi.toml to produce python3.def
run: |
./parse-stable-abi.py < stable_abi.toml > src/python3.def
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: update-stable-abi
delete-branch: true
add-paths: |
src/python3.def
title: 'Update python3.def using stable_abi.toml from the latest main'
commit-message: 'chore: Update python3.def using stable_abi.toml from the latest main'
body: 'Source: https://raw.githubusercontent.com/python/cpython/main/Misc/stable_abi.toml'
update-pythonxy:
name: Update pythonXY.def
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install gendef
run: |
sudo apt-get install -y mingw-w64-tools
- name: Download DLLs
uses: dawidd6/action-download-artifact@v2
with:
workflow: dll.yml
workflow_conclusion: success
- name: Generate DEF
shell: bash
run: |
set -e
for f in dll/*.dll; do
gendef $f
done
ls -lrth *.def
mv *.def src/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: update-pythonxy
delete-branch: true
add-paths: |
src/*.def
title: 'Update pythonXY.def'
commit-message: 'chore: Update pythonXY.def'