-
-
Notifications
You must be signed in to change notification settings - Fork 6
158 lines (139 loc) · 4.03 KB
/
update-build-tools.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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: update build tools
on:
push:
paths:
- "scripts/*/cpanfile"
- ".github/workflows/update-build-tools.yml"
branches-ignore:
# to avoid recursion
- "auto-update/**"
schedule:
- cron: "27 23 * * *"
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: carton install
shell: bash
run: |
rm -f cpanfile.snapshot
../../bin/carton install
working-directory: ./scripts/linux
- uses: actions/upload-artifact@v4
with:
name: cpanfile.snapshot-linux
path: scripts/linux/cpanfile.snapshot
darwin:
runs-on: macos-13
steps:
- name: setup host perl
run: perl -MConfig -E 'say "$Config{bin}"' >> "$GITHUB_PATH"
- name: Checkout
uses: actions/checkout@v4
- name: carton install
shell: bash
run: |
rm -f cpanfile.snapshot
../../bin/carton install
working-directory: ./scripts/darwin
- uses: actions/upload-artifact@v4
with:
name: cpanfile.snapshot-darwin
path: scripts/darwin/cpanfile.snapshot
windows:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup host perl
shell: bash
run: |
cat << 'END_OF_PATH' >> "$GITHUB_PATH"
C:\MinGW\bin
C:\strawberry\perl\site\bin
C:\strawberry\perl\bin
END_OF_PATH
- run: "rm -f scripts/windows/cpanfile.snapshot"
shell: bash
- name: carton install
shell: cmd
run: ..\..\bin\carton install
working-directory: ./scripts/windows
- uses: actions/upload-artifact@v4
with:
name: cpanfile.snapshot-windows
path: scripts/windows/cpanfile.snapshot
common:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: carton install
shell: bash
run: |
rm -f cpanfile.snapshot
../../bin/carton install
working-directory: ./scripts/common
- uses: actions/upload-artifact@v4
with:
name: cpanfile.snapshot-common
path: scripts/common/cpanfile.snapshot
commit:
runs-on: ubuntu-latest
needs:
- linux
- darwin
- windows
- common
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: cleanup
run: |
rm -f scripts/linux/cpanfile.snapshot
rm -f scripts/darwin/cpanfile.snapshot
rm -f scripts/windows/cpanfile.snapshot
rm -f scripts/common/cpanfile.snapshot
- name: download cpanfile.snapshot for linux
uses: actions/download-artifact@v4
with:
name: cpanfile.snapshot-linux
path: scripts/linux
- name: download cpanfile.snapshot for darwin
uses: actions/download-artifact@v4
with:
name: cpanfile.snapshot-darwin
path: scripts/darwin
- name: download cpanfile.snapshot for windows
uses: actions/download-artifact@v4
with:
name: cpanfile.snapshot-windows
path: scripts/windows
- name: download cpanfile.snapshot for any-platform
uses: actions/download-artifact@v4
with:
name: cpanfile.snapshot-common
path: scripts/common
- name: update other dependencies
run: |
./.github/update-dependencies.sh
env:
GH_TOKEN: ${{ github.token }}
- name: Generate token
id: generate_token
uses: shogo82148/actions-github-app-token@v1
- name: commit
uses: shogo82148/actions-commit-and-create-pr@v1
with:
github-token: ${{ steps.generate_token.outputs.token }}
head-branch-prefix: "auto-update/build-tools-"
commit-message: "update build tools"