66 lines
2 KiB
YAML
66 lines
2 KiB
YAML
name: Build Linux AppImages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build_linux_amd64:
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Clone Main Repo
|
|
run: |
|
|
git clone --depth 1 https://github.com/liamcottle/reticulum-meshchat reticulum-meshchat
|
|
|
|
- name: Get Latest Tag
|
|
working-directory: ./reticulum-meshchat
|
|
run: |
|
|
git fetch --tags --quiet https://github.com/liamcottle/reticulum-meshchat
|
|
LATEST_TAG=$(git describe --tags --abbrev=0)
|
|
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
|
|
echo "Latest tag is $LATEST_TAG"
|
|
git checkout $LATEST_TAG
|
|
|
|
- name: Install NodeJS
|
|
uses: https://github.com/actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install Python
|
|
uses: https://github.com/actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install Python Deps
|
|
working-directory: ./reticulum-meshchat
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Install NodeJS Deps
|
|
working-directory: ./reticulum-meshchat
|
|
run: npm install
|
|
|
|
- name: Build Electron App for AMD64
|
|
working-directory: ./reticulum-meshchat
|
|
run: npm run dist
|
|
env:
|
|
ELECTRON_BUILDER_ARCH: x64
|
|
|
|
- name: Rename AppImage with AMD64 Label
|
|
run: |
|
|
for file in reticulum-meshchat/dist/*.AppImage; do
|
|
FILENAME=$(basename "$file")
|
|
NAME_WITHOUT_EXT="${FILENAME%.AppImage}"
|
|
mv "$file" "reticulum-meshchat/dist/${NAME_WITHOUT_EXT}-amd64.AppImage"
|
|
done
|
|
|
|
- name: Create Release
|
|
working-directory: ./reticulum-meshchat
|
|
uses: https://github.com/ncipollo/release-action@v1
|
|
with:
|
|
tag: "${{ env.LATEST_TAG }}"
|
|
allowUpdates: true
|
|
replacesArtifacts: true
|
|
artifacts: "dist/ReticulumMeshChat-${{ env.LATEST_TAG }}-linux-amd64.AppImage"
|