@@ -12,6 +12,7 @@ defaults:
12
12
shell : bash
13
13
14
14
jobs :
15
+
15
16
init :
16
17
runs-on : ubuntu-20.04
17
18
steps :
23
24
name : dist-packages-${{ github.sha }}
24
25
path : dist
25
26
27
+
26
28
build-packages :
27
29
needs : init
28
30
runs-on : ubuntu-20.04
@@ -40,22 +42,20 @@ jobs:
40
42
- uses : actions/setup-python@v4
41
43
with :
42
44
python-version : 3.9
43
-
44
45
- name : Install dependencies
45
46
run : pip install -U setuptools wheel
46
-
47
47
- name : Build packages
48
48
env :
49
49
PACKAGE_NAME : ${{ matrix.pkg-name }}
50
50
run : |
51
51
python setup.py sdist bdist_wheel
52
52
ls -lh dist/
53
-
54
53
- uses : actions/upload-artifact@v3
55
54
with :
56
55
name : dist-packages-${{ github.sha }}
57
56
path : dist
58
57
58
+
59
59
upload-packages :
60
60
runs-on : ubuntu-20.04
61
61
needs : build-packages
73
73
files : ' dist/*'
74
74
repo-token : ${{ secrets.GITHUB_TOKEN }}
75
75
76
+
76
77
release-version :
77
78
runs-on : ubuntu-20.04
78
79
outputs :
87
88
id : lai-package
88
89
run : python -c "import lightning as L; print(f'version={L.__version__}')" >> $GITHUB_OUTPUT
89
90
91
+
90
92
signaling :
91
93
runs-on : ubuntu-20.04
92
94
needs : [release-version]
@@ -100,12 +102,6 @@ jobs:
100
102
with :
101
103
repository : gridai/base-images
102
104
token : ${{ secrets.PAT_GHOST }}
103
- ref : main
104
- - uses : fregante/setup-git-token@v1
105
- with :
106
- token : ${{ secrets.PAT_GHOST }}
107
- name : PL Ghost
108
-
109
105
- name : Update lightning version
110
106
run : |
111
107
import json, os
@@ -115,18 +111,21 @@ jobs:
115
111
with open("versions.json", "w") as fw:
116
112
json.dump(vers, fw)
117
113
shell : python
118
- - name : GIT Commit
114
+ - run : cat versions.json
115
+ - name : GIT commit & push
116
+ env :
117
+ BRANCH_NAME : " trigger/lightning-${{ env.TAG }}"
119
118
run : |
119
+ git config --global user.name "PL Ghost"
120
+ git config --global user.email [email protected]
121
+ git checkout -b ${BRANCH_NAME}
120
122
git add versions.json
121
- git commit -m "bumping lightning version -> ${TAG}"
122
- cat versions.json
123
- - name : GIT Push
124
- run : |
125
123
git status
126
- git push
124
+ git commit -m "bumping lightning version -> ${TAG}"
125
+ git push -u origin ${BRANCH_NAME} -f
126
+
127
127
128
128
waiting :
129
- # TODO: replace with back signal from build images/ loop checking for a specific branch?
130
129
runs-on : ubuntu-20.04
131
130
needs : [release-version, signaling]
132
131
env :
@@ -150,6 +149,7 @@ jobs:
150
149
time.sleep(60)
151
150
shell : python
152
151
152
+
153
153
pre-publish-packages :
154
154
runs-on : ubuntu-20.04
155
155
needs : build-packages
@@ -179,6 +179,7 @@ jobs:
179
179
pkg-pattern : " *"
180
180
pypi-test-token : ${{ secrets.PYPI_TEST_TOKEN_LAI }}
181
181
182
+
182
183
publish-packages :
183
184
runs-on : ubuntu-20.04
184
185
needs : [build-packages, waiting]
@@ -208,6 +209,7 @@ jobs:
208
209
pkg-pattern : " *"
209
210
pypi-token : ${{ secrets.PYPI_TOKEN_LAI }}
210
211
212
+
211
213
legacy-checkpoints :
212
214
needs : [build-packages]
213
215
uses : ./.github/workflows/legacy-checkpoints.yml
0 commit comments