Skip to content

Commit 6e4f80e

Browse files
committed
Publish releases on tags
1 parent f547d1f commit 6e4f80e

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ on:
66
- master
77
- feature/ci
88

9-
pull_request:
10-
11-
create:
129
tags:
10+
- v[0-9]+.*
11+
- testing-ci.*
12+
13+
pull_request:
1314

1415
jobs:
1516
lint:
@@ -49,7 +50,7 @@ jobs:
4950
run: cargo test --all
5051

5152
build-bin:
52-
if: github.event_name == 'create' && github.event.ref_type == 'tag'
53+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
5354

5455
name: Build binary package
5556
runs-on: ubuntu-16.04
@@ -75,7 +76,7 @@ jobs:
7576
path: release
7677

7778
build-deb:
78-
if: github.event_name == 'create' && github.event.ref_type == 'tag'
79+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
7980

8081
name: Build deb package
8182
runs-on: ubuntu-16.04
@@ -114,3 +115,30 @@ jobs:
114115
with:
115116
name: debian-latest
116117
path: release
118+
119+
release:
120+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
121+
122+
name: Publish release
123+
needs: [build-bin, build-deb]
124+
runs-on: ubuntu-latest
125+
126+
steps:
127+
- name: Download binary artifacts
128+
uses: actions/download-artifact@v1
129+
with:
130+
name: binary-latest
131+
132+
- name: Download Debian artifacts
133+
uses: actions/download-artifact@v1
134+
with:
135+
name: debian-latest
136+
137+
- name: Upload assets
138+
uses: svenstaro/upload-release-action@v1-release
139+
with:
140+
repo_token: ${{ secrets.GITHUB_TOKEN }}
141+
file: ./*-latest/*
142+
tag: ${{ github.ref }}
143+
overwrite: true
144+
file_glob: true

0 commit comments

Comments
 (0)