Skip to content

Commit 214ecc1

Browse files
committed
create GitHub Release on push tag with artifacts
Signed-off-by: CrazyMax <[email protected]>
1 parent 056f879 commit 214ecc1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,30 @@ jobs:
143143
env:
144144
CACHE_FROM: type=gha,scope=build
145145
CACHE_TO: type=gha,scope=build,mode=max
146+
-
147+
name: List artifacts
148+
run: |
149+
tree -nh ${{ env.DESTDIR }}
150+
-
151+
name: Check artifacts
152+
run: |
153+
find ${{ env.DESTDIR }} -type f -exec file -e ascii -- {} +
146154
-
147155
name: Upload artifacts
148156
uses: actions/upload-artifact@v3
149157
with:
150158
name: docker-credential-helpers
151159
path: ${{ env.DESTDIR }}/*
152160
if-no-files-found: error
161+
-
162+
name: GitHub Release
163+
if: startsWith(github.ref, 'refs/tags/v')
164+
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
165+
env:
166+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167+
with:
168+
draft: true
169+
files: ${{ env.DESTDIR }}/*
153170

154171
build-deb:
155172
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)