Skip to content

Commit ba4c84d

Browse files
committed
Publish distributables as a release
1 parent 665999f commit ba4c84d

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,25 @@ jobs:
4444
with:
4545
name: distributables
4646
path: dist/HttpToolkit-*
47-
if-no-files-found: error
47+
if-no-files-found: error
48+
publish:
49+
name: Publish a release
50+
runs-on: "ubuntu-18.04"
51+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
52+
steps:
53+
- name: Get our distributables
54+
uses: actions/download-artifact@v2
55+
with:
56+
name: distributables
57+
path: built-distributables
58+
59+
- run: |
60+
set -x
61+
assets=()
62+
for asset in ./built-distributables/*; do
63+
assets+=("-a" "$asset")
64+
done
65+
tag_name="${GITHUB_REF/refs\/tags\//}"
66+
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)