-
Notifications
You must be signed in to change notification settings - Fork 34
54 lines (45 loc) · 1.42 KB
/
build_rpm.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
name: build rpm
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build-and-package-x86_64:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip setuptools wheel
pip3 install -r requirements3.txt
- name: Set up RPM build env
run: |
sudo apt-get update && sudo apt-get install -y rpm alien fakeroot
- name: Build package
run: |
pwd
ls -lh
export RELEASE=`date +%Y%m%d%H%M`
cat ./rpm/oceanbase-diagnostic-tool.spec
rpmbuild -bb ./rpm/oceanbase-diagnostic-tool.spec
- name: Convert RPM to DEB
run: |
mkdir -p /home/runner/artifacts
fakeroot alien --scripts --to-deb /home/runner/rpmbuild/RPMS/x86_64/oceanbase-diagnostic-tool-*.rpm
- name: 'Upload Artifacts'
uses: actions/upload-artifact@v3
with:
name: obdiag-packages
path: |
/home/runner/rpmbuild/RPMS/x86_64/oceanbase-diagnostic-tool-*.rpm
/home/runner/work/oceanbase-diagnostic-tool/oceanbase-diagnostic-tool/oceanbase-diagnostic-tool_*.deb
retention-days: 3
debug: true