2023-11-19 20:30:34 +00:00
name : Package Raspbian
2023-11-22 13:17:48 +00:00
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 :
2024-09-19 23:21:30 +00:00
runs-on : ubuntu-22.04
2023-11-19 21:48:43 +00:00
needs : build-raspbian
2023-11-19 20:30:34 +00:00
steps :
2023-11-20 02:19:43 +00:00
- name : Checkout code
2024-05-13 08:47:40 +00:00
uses : actions/checkout@v4
2023-11-20 02:19:43 +00:00
with :
2023-11-20 02:28:37 +00:00
submodules : recursive
2023-11-20 02:19:43 +00:00
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
2024-05-13 08:47:40 +00:00
uses : dsaltares/fetch-gh-release-asset@master
2024-03-06 23:00:23 +00:00
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
2024-05-13 08:47:40 +00:00
uses : actions/download-artifact@v4
2023-11-19 21:48:43 +00:00
with :
name : firmware-raspbian-${{ steps.version.outputs.version }}.zip
2024-05-13 08:47:40 +00:00
merge-multiple : true
2023-11-19 21:48:43 +00:00
- 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 : |
2024-05-17 08:32:11 +00:00
mkdir -p .debpkg/DEBIAN
2024-11-12 12:40:46 +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
2024-10-29 02:48:10 +00:00
mkdir -p .debpkg/etc/meshtasticd/config.d
mkdir -p .debpkg/etc/meshtasticd/available.d
2023-11-19 20:30:34 +00:00
mkdir -p .debpkg/usr/lib/systemd/system/
2024-11-12 12:40:46 +00:00
tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web
2024-11-10 12:56:44 +00:00
shopt -s dotglob nullglob
2024-11-12 12:40:46 +00:00
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi
if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi
2024-12-04 18:15:17 +00:00
if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store ]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi
2024-11-26 04:49:13 +00:00
gunzip .debpkg/usr/share/doc/meshtasticd/web/ -r
2024-01-14 01:11:59 +00:00
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
2024-12-04 18:15:17 +00:00
cp bin/config.d/* .debpkg/etc/meshtasticd/available.d/ -r
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
2024-05-17 08:32:11 +00:00
echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles
chmod +x .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
2024-03-26 05:58:47 +00:00
depends : libyaml-cpp0.7, openssl, libulfius2.7
2023-11-19 20:30:34 +00:00
desc : Native Linux Meshtastic binary.
2023-11-19 22:07:08 +00:00
2024-05-13 08:47:40 +00:00
- uses : actions/upload-artifact@v4
2023-11-19 22:07:08 +00:00
with :
2024-05-20 02:12:47 +00:00
name : meshtasticd_${{ steps.version.outputs.version }}_arm64.deb
2024-05-13 08:47:40 +00:00
overwrite : true
2023-11-19 22:07:08 +00:00
path : |
2024-12-04 18:15:17 +00:00
./*.deb