Skip to content

Commit 89eff03

Browse files
committed
Setup packaging via github actions
1 parent 6caa61d commit 89eff03

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- feature/ci
77

8+
create:
9+
tags:
10+
811
jobs:
912
lint:
1013
name: Clippy
@@ -41,3 +44,58 @@ jobs:
4144

4245
- name: Test
4346
run: cargo test --all
47+
48+
build-bin:
49+
if: github.event_name == 'create' && github.event.ref_type == 'tag'
50+
51+
name: Build binary package
52+
runs-on: ubuntu-16.04
53+
needs: [lint, test]
54+
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v2
58+
59+
- name: Install rust
60+
run: rustup update stable && rustup default stable
61+
62+
- name: Build package
63+
run: ./pkg/bin/makebin
64+
65+
- name: Prepare release
66+
run: mkdir release && mv pkg/bin/*.tar.xz release
67+
68+
- name: Upload artifacts
69+
uses: actions/upload-artifact@v1
70+
with:
71+
name: binary-latest
72+
path: release
73+
74+
build-deb:
75+
if: github.event_name == 'create' && github.event.ref_type == 'tag'
76+
77+
name: Build deb package
78+
runs-on: ubuntu-16.04
79+
needs: [lint, test]
80+
81+
steps:
82+
- name: Checkout code
83+
uses: actions/checkout@v2
84+
85+
- name: Install rust
86+
run: rustup update stable && rustup default stable
87+
88+
- name: Install dependencies
89+
run: sudo apt-get install debhelper fakeroot
90+
91+
- name: Build package
92+
run: ./pkg/deb/makedeb
93+
94+
- name: Prepare release
95+
run: mkdir release && mv pkg/deb/*.deb release
96+
97+
- name: Upload artifacts
98+
uses: actions/upload-artifact@v1
99+
with:
100+
name: debian-latest
101+
path: release

0 commit comments

Comments
 (0)