Skip to content

Commit 0f26d59

Browse files
committed
ci: Create release_packages.yml
Add deb packages and md5 sum files generation for releases.
1 parent 0bd67a5 commit 0f26d59

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Release packages
2+
on:
3+
release:
4+
types: [published]
5+
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-pc:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up CMake
16+
uses: jwlawson/actions-setup-cmake@v2
17+
18+
- name: Build PC Linux version of openAPV, generate packages and md5 file
19+
run: |
20+
cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
21+
cmake --build ${{github.workspace}}/build
22+
make package
23+
24+
- name: 'Upload PC Linux artifacts'
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: openapv-linux-${{github.event.release.tag_name}}
28+
path: |
29+
${{ github.workspace }}/build/*.deb
30+
${{ github.workspace }}/build/*.md5
31+
retention-days: 7
32+
33+
- name: Upload Linux assets to GitHub Release
34+
uses: xresloader/upload-to-github-release@v1
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
with:
38+
file: "build/*.deb; build/*.md5"
39+
update_latest_release: true
40+
draft: false
41+
overwrite: true
42+
43+
build-arm:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v4
48+
49+
- name: Set up CMake
50+
uses: jwlawson/actions-setup-cmake@v2
51+
52+
- name: Install ARM toolchain
53+
run: |
54+
sudo apt-get update
55+
sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
56+
57+
- name: Build ARM
58+
run: |
59+
cmake -DCMAKE_BUILD_TYPE=Release -S ${{github.workspace}} -B ${{github.workspace}}/build-arm -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DARM=TRUE -DCMAKE_SYSTEM_PROCESSOR=aarch64
60+
cmake --build ${{github.workspace}}/build-arm
61+
make package
62+
63+
- name: 'Upload ARM artifacts'
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: openapv-arm-${{github.event.release.tag_name}}
67+
path: |
68+
${{ github.workspace }}/build/*.deb
69+
${{ github.workspace }}/build/*.md5
70+
retention-days: 7
71+
72+
- name: Upload ARM assets to GitHub Release
73+
uses: xresloader/upload-to-github-release@v1
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
with:
77+
file: "build/*.deb; build/*.md5"
78+
update_latest_release: true
79+
draft: false
80+
overwrite: true
81+

0 commit comments

Comments
 (0)