-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (64 loc) · 2.19 KB
/
publish_deb.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Publish deb package
on:
push:
branches:
master
jobs:
create_release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
use_api: true
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
release_name: ${{ steps.version.outputs.version }}
build_deb_2004:
needs: create_release
runs-on: ubuntu-20.04
steps:
- name: Install git
run: sudo apt-get -qq update -y && sudo apt-get -qq install cmake ninja-build rapidjson-dev -y
- name: Check out
uses: actions/checkout@v4
- name: Build package
working-directory: .
run: mkdir build && cd build && cmake -GNinja .. && ninja && ninja package
- name: Upload to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: build/libosi-0.1.1-Linux.deb
asset_name: libosi_20.04.deb
asset_content_type: application/vnd.debian.binary-package
build_deb_2204:
needs: create_release
runs-on: ubuntu-22.04
steps:
- name: Install git
run: sudo apt-get -qq update -y && sudo apt-get -qq install cmake ninja-build rapidjson-dev -y
- name: Check out
uses: actions/checkout@v4
- name: Build package
working-directory: .
run: mkdir build && cd build && cmake -GNinja .. && ninja && ninja package
- name: Upload to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: build/libosi-0.1.1-Linux.deb
asset_name: libosi_22.04.deb
asset_content_type: application/vnd.debian.binary-package