Skip to content

Commit 361be57

Browse files
Tweak build config to support auto-sign workflow
1 parent e708bfb commit 361be57

File tree

1 file changed

+37
-40
lines changed

1 file changed

+37
-40
lines changed

.github/workflows/package.yml

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ jobs:
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
5858
retention-days: 30
59+
5960
ubuntu-focal:
6061
runs-on: ubuntu-latest
6162
strategy:
@@ -103,11 +104,10 @@ 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
108109
retention-days: 30
109110

110-
111111
windows:
112112
runs-on: windows-latest
113113
strategy:
@@ -143,11 +143,10 @@ 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
148148
retention-days: 30
149149

150-
151150
centos:
152151
runs-on: ubuntu-latest
153152
env:
@@ -206,11 +205,10 @@ 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
211210
retention-days: 30
212211

213-
214212
examples:
215213
runs-on: ubuntu-latest
216214
steps:
@@ -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
226224
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
234232
retention-days: 30
235233

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 }}
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
250+
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+
- uses: AButler/[email protected]
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

Comments
 (0)