Skip to content

Commit 9176b01

Browse files
committed
Generate def files based on collected DLLs
1 parent 2a6266b commit 9176b01

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

.github/workflows/update.yml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
name: Update stable_abi.toml
1+
name: Update python.def
22

33
on:
44
workflow_dispatch:
5+
workflow_run:
6+
workflows:
7+
- Collect pythonXY.dll
8+
types:
9+
- completed
510
schedule:
611
# Run every week
712
- cron: '0 0 * * 0'
813

914
jobs:
10-
update:
15+
update-stable-abi:
1116
name: Update stable_abi.toml
1217
runs-on: ubuntu-latest
1318
steps:
@@ -24,9 +29,42 @@ jobs:
2429
- name: Create Pull Request
2530
uses: peter-evans/create-pull-request@v4
2631
with:
32+
branch: update-stable-abi
2733
delete-branch: true
2834
add-paths: |
2935
src/python3.def
3036
title: 'Update python3.def using stable_abi.toml from the latest main'
3137
commit-message: 'chore: Update python3.def using stable_abi.toml from the latest main'
3238
body: 'Source: https://raw.githubusercontent.com/python/cpython/main/Misc/stable_abi.toml'
39+
40+
update-pythonxy:
41+
name: Update pythonXY.def
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
- name: Install gendef
46+
run: |
47+
sudo apt-get install -y mingw-w64-tools
48+
- name: Download DLLs
49+
uses: dawidd6/action-download-artifact@v2
50+
with:
51+
workflow: dll.yml
52+
workflow_conclusion: success
53+
- name: Generate DEF
54+
shell: bash
55+
run: |
56+
set -e
57+
for f in dll/python*.dll; do
58+
gendef $f
59+
done
60+
ls -lrth *.def
61+
mv *.def src/
62+
- name: Create Pull Request
63+
uses: peter-evans/create-pull-request@v4
64+
with:
65+
branch: update-pythonxy
66+
delete-branch: true
67+
add-paths: |
68+
src/python*.def
69+
title: 'Update pythonXY.def'
70+
commit-message: 'chore: Update pythonXY.def'

0 commit comments

Comments
 (0)