build: Initial stab at packaging #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: 📦 Build .deb-package for bbb-plugin-generic-link-share | |
on: | |
push: | |
branches: [ "main"] | |
paths-ignore: | |
- debian/changelog | |
pull_request: | |
branches: [ "main" ] | |
paths-ignore: | |
- debian/changelog | |
jobs: | |
build-deb-package: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: . | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
run: | | |
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
- name: Verify Node.js installation | |
run: | | |
node -v | |
npm -v | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y devscripts debhelper | |
- name: Build Debian package | |
run: sudo dpkg-buildpackage -us -uc | |
- name: Upload Debian Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bbb-plugin-generic-link-share-ubuntu-22.04 | |
path: "*.deb" | |
release: | |
name: "Upload assets to release" | |
needs: build-deb-package | |
runs-on: ubuntu-latest | |
if: ${{ github.ref_type == 'tag' }} | |
permissions: | |
contents: write | |
actions: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: bbb-plugin-generic-link-share-ubuntu-22.04 | |
path: bbb-plugin-generic-link-share-ubuntu-22.04 | |
- name: Create release asset archives | |
run: zip --junk-paths --recurse-paths --compression-method store "bbb-plugin-generic-link-share-ubuntu-22.04.zip" "bbb-plugin-generic-link-share-ubuntu-22.04" | |
- name: Upload release assets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ github.ref_name }} "bbb-plugin-generic-link-share-ubuntu-22.04.zip" | |