Skip to content

Commit 3ac9882

Browse files
authoredMay 29, 2020
Merge pull request #4 from konradmb/release-ci
Upload release on v* tag
2 parents 7646c52 + e830b12 commit 3ac9882

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed
 

‎.github/workflows/build.yml

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
name: Build
1+
name: Build and release
22

33
on:
44
push:
55
branches: [ master ]
6+
tags:
7+
- v*
68
pull_request:
79
branches: [ master ]
810

@@ -30,3 +32,22 @@ jobs:
3032
with:
3133
name: AppImage
3234
path: build/Zegarek*.AppImage
35+
36+
- name: Set ref
37+
id: set_ref
38+
run: |
39+
echo $GITHUB_REF
40+
FILTERED_REF=`echo $GITHUB_REF | sed "s?refs/tags/v??"`
41+
echo "::set-env name=FILTERED_REF::$FILTERED_REF"
42+
43+
- name: Release
44+
uses: softprops/action-gh-release@v1
45+
if: startsWith(github.ref, 'refs/tags/v')
46+
with:
47+
files: |
48+
build/Zegarek*.AppImage
49+
draft: false
50+
prerelease: false
51+
name: Zegarek ${{ env.FILTERED_REF }}
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)
Please sign in to comment.