-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.95 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Release
on: workflow_dispatch
env:
FPM_OPTS: "-s dir --prefix '/usr' -n kvrocks --verbose -a native \
--config-files /usr/share/kvrocks/kvrocks.conf \
--description 'A distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol' \
--url 'https://kvrocks.apache.org' --license 'Apache-2.0'"
jobs:
release-packages:
name: Release DEB Package
runs-on: ubuntu-20.04
steps:
uses: actions/[email protected]
with:
fetch-depth: 64
- name: Install Dependencies
run: |
sudo apt-get install -y git build-essential cmake libtool python3
- name: Set env variables
run: |
echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
echo "ITERATION=$(cat ITERATION)" >> $GITHUB_ENV
- name: Build
run: |
git clone -b v{{ env.VERSION }} https://github.com/apache/kvrocks kvrocks
cd kvrocks
./x.py build -DPORTABLE=1 -DCMAKE_BUILD_TYPE=Release -j $(nproc)
- name: Make release directory
mkdir release
mkdir release/bin release/share
mkdir release/share/kvrocks
cp kvrocks/build/kvrocks release/bin/
cp kvrocks/build/kvrocks2redis release/bin/
cp kvrocks/kvrocks.conf release/share/kvrocks
cp -r kvrocks/LICENSE kvrocks/NOTICE kvrocks/licenses release/share/kvrocks
cp kvrocks/utils/systemd/kvrocks.service release/share/kvrocks
- name: Package Deb
uses: bpicode/[email protected]
with:
fpm_args: './release'
fpm_opts: '-t deb -v {{ env.VERSION }} --iteration {{ env.ITERATION }} ${{ env.FPM_OPTS }}'
- name: Release
uses: softprops/action-gh-release@v1
with:
name: |
{{ env.VERSION }}-{{ env.ITERATION }}
files: |
./*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}