5353 - name : Make artifacts
5454 uses : actions/upload-artifact@v2
5555 with :
56- name : user-sync-artifact
56+ name : ubuntu-bionic
5757 path : dist/*.tar.gz
58- retention-days : 5
58+ retention-days : 30
59+
5960 ubuntu-focal :
6061 runs-on : ubuntu-latest
6162 strategy :
@@ -103,10 +104,9 @@ jobs:
103104 - name : Make artifacts
104105 uses : actions/upload-artifact@v2
105106 with :
106- name : user-sync-artifact
107+ name : ubuntu-focal
107108 path : dist/*.tar.gz
108- retention-days : 5
109-
109+ retention-days : 30
110110
111111 windows :
112112 runs-on : windows-latest
@@ -143,10 +143,9 @@ jobs:
143143 - name : Make artifact
144144 uses : actions/upload-artifact@v2
145145 with :
146- name : user-sync-artifact
146+ name : windows
147147 path : dist/*.zip
148- retention-days : 5
149-
148+ retention-days : 30
150149
151150 centos :
152151 runs-on : ubuntu-latest
@@ -174,7 +173,7 @@ jobs:
174173 wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
175174 tar xzf Python-3.9.7.tgz
176175 cd Python-3.9.7
177- ./configure --enable-optimizations --enable-shared
176+ ./configure --enable-optimizations --enable-shared --enable-loadable-sqlite-extensions
178177 make altinstall
179178 cd ../..
180179 - name : Build executable
@@ -206,10 +205,9 @@ jobs:
206205 - name : Make artifact
207206 uses : actions/upload-artifact@v2
208207 with :
209- name : user-sync-artifact
208+ name : centos
210209 path : dist/*.tar.gz
211- retention-days : 5
212-
210+ retention-days : 30
213211
214212 examples :
215213 runs-on : ubuntu-latest
@@ -221,46 +219,45 @@ jobs:
221219 zip -r user-sync-examples.zip .
222220 - uses : actions/upload-artifact@v2
223221 with :
224- name : user-sync-artifact
222+ name : examples
225223 path : examples/*.zip
226- retention-days : 5
224+ retention-days : 30
227225 - name : user-sync.tar.gz
228226 run : |
229227 tar -czvf "user-sync-examples.tar.gz" examples
230228 - uses : actions/upload-artifact@v2
231229 with :
232- name : user-sync-artifact
230+ name : examples
233231 path : user-sync-examples.tar.gz
234- retention-days : 5
232+ retention-days : 30
233+
234+ release :
235+ runs-on : ubuntu-latest
236+ needs : [centos, ubuntu-bionic, ubuntu-focal, examples, windows]
237+ steps :
238+ - uses : actions/checkout@v2
239+ - name : Create Release
240+ id : create_release
241+ uses : actions/create-release@v1
242+ env :
243+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
244+ with :
245+ tag_name : ${{ github.ref }}
246+ release_name : User Sync Tool ${{ github.ref }}
247+ body_path : .changelog/latest.md
248+ draft : false
249+ prerelease : false
235250
236- # release:
237- # runs-on: ubuntu-latest
238- # needs: [ubuntu,windows, centos, examples]
239- # steps:
240- # - uses: actions/checkout@v2
241- # - name: Create Release
242- # id: create_release
243- # uses: actions/create-release@v1
244- # env:
245- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
246- # with:
247- # tag_name: ${{ github.ref }}
248- # release_name: user-sync ${{ github.ref }}
249- # body_path: .changelog/latest.md
250- # draft: true
251- # prerelease: false
252- #
253- # upload-assets:
254- # needs: release
255- # runs-on: ubuntu-latest
256- # steps:
257- # - uses: actions/download-artifact@v2
258- # - name: Get version tag
259- # id: get_version
260- # uses: battila7/get-version-action@v2
261- # - run: ls -R
262- # - uses: fnkr/github-action-ghr@v1
263- # if: startsWith(github.ref, 'refs/tags/')
264- # env:
265- # GHR_PATH: user-sync-artifact/
266- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
251+ upload-assets :
252+ needs : release
253+ runs-on : ubuntu-latest
254+ steps :
255+ - uses : actions/download-artifact@v2
256+ - name : Get version tag
257+ id : get_version
258+ uses : battila7/get-version-action@v2
259+ 260+ with :
261+ files : ' examples/*;ubuntu-bionic/*;ubuntu-focal/*;centos/*'
262+ repo-token : ${{ secrets.GITHUB_TOKEN }}
263+ release-tag : ${{ steps.get_version.outputs.version }}
0 commit comments