77 workflow_dispatch :
88
99jobs :
10+ branch-setup :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v3
16+
17+ - name : Remove README
18+ run : |
19+ rm -f README.md
20+ rm -rf .github
21+
22+ - name : Set up Git
23+ run : |
24+ # bot name from secrets
25+ git config user.name "${{ secrets.BOT_NAME }}"
26+ git config user.email "${{ secrets.BOT_EMAIL }}"
27+ git checkout --orphan latest-release
28+
29+ - name : Commit and push changes
30+ run : |
31+ git add .
32+ git commit -m "Latest build $(date "+%Y-%m-%d %H:%M:%S")"
33+ git push -f origin latest-release
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36+
1037 build-mac :
1138 runs-on : macos-latest
39+ needs : [branch-setup]
1240
1341 steps :
1442 - name : Checkout
3159
3260 - name : Set up Git
3361 run : |
34- git config user.name "github-actions[bot] "
35- git config user.email "41898282+github-actions[bot]@users.noreply.github.com "
36- git checkout --orphan latest-release
62+ git config user.name "${{ secrets.BOT_NAME }} "
63+ git config user.email "${{ secrets.BOT_EMAIL }} "
64+ git checkout latest-release
3765
3866 - name : Commit and push changes
3967 run : |
4573
4674 build-windows :
4775 runs-on : windows-latest
76+ needs : [branch-setup]
4877
4978 steps :
5079 - name : Checkout
6796
6897 - name : Set up Git
6998 run : |
70- git config user.name "github-actions[bot] "
71- git config user.email "41898282+github-actions[bot]@users.noreply.github.com "
72- git checkout --orphan latest-release
99+ git config user.name "${{ secrets.BOT_NAME }} "
100+ git config user.email "${{ secrets.BOT_EMAIL }} "
101+ git checkout latest-release
73102
74103 - name : Commit and push changes
75104 run : |
81110
82111 build-linux :
83112 runs-on : ubuntu-latest
113+ needs : [branch-setup]
84114
85115 steps :
86116 - name : Checkout
@@ -103,9 +133,9 @@ jobs:
103133
104134 - name : Set up Git
105135 run : |
106- git config user.name "github-actions[bot] "
107- git config user.email "41898282+github-actions[bot]@users.noreply.github.com "
108- git checkout --orphan latest-release
136+ git config user.name "${{ secrets.BOT_NAME }} "
137+ git config user.email "${{ secrets.BOT_EMAIL }} "
138+ git checkout latest-release
109139
110140 - name : Commit and push changes
111141 run : |
@@ -117,25 +147,25 @@ jobs:
117147
118148 release :
119149 runs-on : ubuntu-latest
150+ needs : [branch-setup, build-mac, build-windows, build-linux]
120151
121152 steps :
122153 - name : Checkout
123154 uses : actions/checkout@v3
124155
125156 - name : Remove README
126157 run : |
127- rm -f README.md
128- rm -rf .github
158+ rm -f requirements.txt
129159
130160 - name : Version File
131161 run : |
132162 date +%s > version
133163
134164 - name : Set up Git
135165 run : |
136- git config user.name "github-actions[bot] "
137- git config user.email "41898282+github-actions[bot]@users.noreply.github.com "
138- git checkout --orphan latest-release
166+ git config user.name "${{ secrets.BOT_NAME }} "
167+ git config user.email "${{ secrets.BOT_EMAIL }} "
168+ git checkout latest-release
139169
140170 - name : Commit and push changes
141171 run : |
0 commit comments