meshtastic-firmware/.github/workflows/package_raspbian.yml

76 wiersze
2.3 KiB
YAML
Czysty Zwykły widok Historia

2023-11-19 20:30:34 +00:00
name: Package Raspbian
on:
workflow_call:
workflow_dispatch:
2023-11-19 20:30:34 +00:00
permissions:
contents: write
packages: write
jobs:
2023-11-19 21:48:43 +00:00
build-raspbian:
uses: ./.github/workflows/build_raspbian.yml
2023-11-19 22:53:00 +00:00
2023-11-19 20:30:34 +00:00
package-raspbian:
runs-on: ubuntu-latest
2023-11-19 21:48:43 +00:00
needs: build-raspbian
2023-11-19 20:30:34 +00:00
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
2023-11-20 02:28:37 +00:00
submodules: recursive
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
2023-11-19 22:53:00 +00:00
2024-03-06 23:00:23 +00:00
- name: Pull web ui
uses: dsaltares/fetch-gh-release-asset@a40c8b4a0471f9ab81bdf73a010f74cc51476ad4
with:
repo: meshtastic/web
file: build.tar
target: build.tar
token: ${{ secrets.GITHUB_TOKEN }}
2023-11-19 21:48:43 +00:00
- name: Get release version string
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
id: version
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: firmware-raspbian-${{ steps.version.outputs.version }}.zip
- name: Display structure of downloaded files
run: ls -R
2023-11-19 22:53:00 +00:00
2023-11-19 20:30:34 +00:00
- name: build .debpkg
run: |
mkdir -p .debpkg/debian
2024-03-06 23:00:23 +00:00
mkdir -p .debpkg/usr/share/doc/meshtasticd/web
2023-11-19 20:30:34 +00:00
mkdir -p .debpkg/usr/sbin
mkdir -p .debpkg/etc/meshtasticd
mkdir -p .debpkg/usr/lib/systemd/system/
2024-03-06 23:00:23 +00:00
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
gunzip .debpkg/usr/share/doc/meshtasticd/web/*.gz
cp release/meshtasticd_linux_aarch64 .debpkg/usr/sbin/meshtasticd
2023-11-19 21:48:43 +00:00
cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml
2023-11-19 20:30:34 +00:00
chmod +x .debpkg/usr/sbin/meshtasticd
2023-11-19 21:48:43 +00:00
cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service
echo "etc/meshtasticd/config.yaml" > .debpkg/debian/conffiles
2023-11-19 20:30:34 +00:00
- uses: jiro4989/build-deb-action@v3
with:
package: meshtasticd
package_root: .debpkg
maintainer: Jonathan Bennett
2023-11-19 21:48:43 +00:00
version: ${{ steps.version.outputs.version }} # refs/tags/v*.*.*
2023-11-19 20:30:34 +00:00
arch: arm64
depends: libyaml-cpp0.7, openssl, libulfius2.7
2023-11-19 20:30:34 +00:00
desc: Native Linux Meshtastic binary.
- uses: actions/upload-artifact@v3
with:
name: artifact-deb
path: |
./*.deb