Skip to content

Commit fd72e8d

Browse files
committed
build: initial stab at packaging
1 parent ebd701f commit fd72e8d

9 files changed

Lines changed: 173 additions & 0 deletions

File tree

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
name: "📦 Build .deb package for plugin"
3+
on:
4+
push:
5+
branches: [ "main"]
6+
paths-ignore:
7+
- debian/changelog
8+
pull_request:
9+
branches: [ "main" ]
10+
paths-ignore:
11+
- debian/changelog
12+
13+
jobs:
14+
build-deb-package:
15+
runs-on: ${{ matrix.os }}
16+
17+
strategy:
18+
matrix:
19+
os: [ubuntu-22.04]
20+
21+
env:
22+
OS_VERSION: ${{ matrix.os }}
23+
defaults:
24+
run:
25+
working-directory: .
26+
steps:
27+
- name: Checkout source code
28+
uses: actions/checkout@v4
29+
30+
- name: Extract and print repository name
31+
run: |
32+
echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
33+
34+
- name: Set up Node.js
35+
run: |
36+
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
37+
sudo apt-get install -y nodejs
38+
39+
- name: Verify Node.js installation
40+
run: |
41+
node -v
42+
npm -v
43+
44+
- name: Install dependencies
45+
run: |
46+
sudo apt-get update
47+
sudo apt-get install -y devscripts debhelper
48+
49+
- name: Build Debian package
50+
run: |
51+
sudo dpkg-buildpackage -us -uc
52+
53+
- name: Create artifacts directory and move .deb files
54+
run: |
55+
mkdir -p artifacts
56+
mv ../*.deb artifacts/ || mv ./*.deb artifacts/
57+
ls -la artifacts
58+
59+
- name: Upload Debian Package
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}"
63+
path: artifacts/*.deb
64+
65+
release:
66+
name: "Upload assets to release"
67+
needs: build-deb-package
68+
runs-on: ${{ matrix.os }}
69+
70+
strategy:
71+
matrix:
72+
os: [ubuntu-22.04]
73+
74+
env:
75+
OS_VERSION: ${{ matrix.os }}
76+
if: ${{ github.ref_type == 'tag' }}
77+
permissions:
78+
contents: write
79+
actions: read
80+
steps:
81+
- uses: actions/checkout@v4
82+
83+
- name: Extract and print repository name
84+
run: |
85+
echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
86+
87+
- uses: actions/download-artifact@v4
88+
with:
89+
name: "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}"
90+
path: "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}"
91+
92+
- name: Create release asset archives
93+
run: zip --junk-paths --recurse-paths --compression-method store "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}.zip" "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}"
94+
95+
- name: Upload release assets
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
run: gh release upload ${{ github.ref_name }} "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}.zip"
99+

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
dist
3+
debian/.debhelper/
4+
debian/debhelper-build-stamp
5+
debian/files
6+
debian/**/copyright
7+
debian/**/changelog.gz
8+
debian/**/md5sums
9+
debian/**/var/www/*
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
misc:Depends=
2+
misc:Pre-Depends=
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Package: bbb-plugin-template
2+
Version: 0.1.0
3+
Architecture: all
4+
Maintainer: Anton Georgiev <anton.georgiev@blindsidenetworks.com>
5+
Installed-Size: 252
6+
Section: web
7+
Priority: extra
8+
Homepage: https://github.com/bigbluebutton/plugin-template
9+
Description: Share a webpage with all session participants
10+
An official BigBlueButton plugin which allows
11+
the presenter to display a web page to
12+
all viewers inside of a session.

debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bbb-plugin-template (0.1.0) jammy; urgency=medium
2+
3+
* initial build
4+
5+
-- Anton Georgiev <anton.georgiev@blindsidenetworks.com> Thu, 04 Jul 2024 14:56:18 -0400

debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
13

debian/control

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Source: bbb-plugin-template
2+
Section: web
3+
Priority: extra
4+
Maintainer: Anton Georgiev <anton.georgiev@blindsidenetworks.com>
5+
Build-Depends: debhelper (>= 13), nodejs (>= 18)
6+
Standards-Version: 4.1.4
7+
Homepage: https://github.com/bigbluebutton/plugin-template
8+
9+
Package: bbb-plugin-template
10+
Architecture: all
11+
Depends: ${misc:Depends}, nodejs
12+
Description: Share a webpage with all session participants
13+
An official BigBlueButton plugin which allows
14+
the presenter to display a web page to
15+
all viewers inside of a session.

debian/copyright

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Format: http://dep.debian.net/deps/dep5
2+
Upstream-Name: bbb-plugin-template
3+
4+
Files: *
5+
Copyright: 2024 BigBlueButton Inc. and by respective authors
6+
License: LGPL-3.0+
7+
This program is free software: you can redistribute it and/or modify it
8+
under the terms of the GNU Lesser General Public License as published by the
9+
Free Software Foundation, either version 3 of the License, or (at your
10+
option) any later version.
11+
12+
This program is distributed in the hope that it will be useful, but
13+
WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15+
Public License for more details.
16+
17+
You should have received a copy of the GNU Lesser General Public License along
18+
with this program. If not, see <http://www.gnu.org/licenses/>.

debian/rules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/make -f
2+
3+
%:
4+
dh $@ --no-parallel --verbose
5+
6+
override_dh_auto_build:
7+
npm install
8+
npm run build-bundle
9+
10+
override_dh_auto_install:
11+
install -d debian/bbb-plugin-template/var/www/bigbluebutton-default/assets/plugins/bbb-plugin-template
12+
cp -r dist/* debian/bbb-plugin-template/var/www/bigbluebutton-default/assets/plugins/bbb-plugin-template

0 commit comments

Comments
 (0)