Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

build and deploy signal #149

build and deploy signal

build and deploy signal #149

Workflow file for this run

name: build and deploy signal
on:
push:
tags:
- '*'
#branches:
# - main
# - master
# - testing
workflow_dispatch:
jobs:
a-publish-release:
#runs-on: self-hosted
runs-on: ubuntu-latest
name: '1 publish release'
steps:
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
prerelease: false
name: ${{ github.ref }}
tag: ${{ github.ref }}
b-build-and-deploy-signal:
runs-on: self-hosted
#runs-on: ubuntu-latest
name: '2 build and deploy signal'
steps:
- name: Set env.BRANCH
run: echo "BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)" >> $GITHUB_ENV
- name: install secrets
shell: bash
env:
ID_RSA: ${{secrets.ID_RSA}}
SSHCONFIG: ${{secrets.SSHCONFIG}}
GPG_KEY: ${{secrets.GPG_KEY}}
run: |
sudo apt update
sudo apt install -qq -y gpg openssh-client
mkdir -p ~/.ssh
echo "$ID_RSA" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "$SSHCONFIG" > ~/.ssh/config
echo "$GPG_KEY" | gpg --import
- name: checkout code
uses: actions/checkout@v4
- name: install deps
shell: bash
run: |
sudo apt install -qq -y bash rsync podman flatpak elfutils coreutils slirp4netns rootlesskit binfmt-support fuse-overlayfs flatpak-builder qemu-user-static
- name: build deb
shell: bash
env:
VERSION: "7.20.0"
run: |
set -x
echo "Version is: $VERSION"
bash ci-build.sh
podman stop signal-desktop-$VERSION
cp ~/signal-desktop.deb .
sha256sum signal-desktop.deb | tee checksums.txt
- name: install flatpak deps
shell: bash
env:
CI_USER: runner
run: |
sudo rm -rf /opt/pakrepo/
sudo mkdir -p /opt/pakrepo
sudo chown "$USER" /opt/pakrepo
sudo flatpak update --noninteractive -y
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install --noninteractive --arch=aarch64 flathub org.electronjs.Electron2.BaseApp//23.08 org.freedesktop.Platform//23.08 org.freedesktop.Sdk//23.08 -y
- name: build flatpak
shell: bash
run: |
flatpak-builder --arch=aarch64 --gpg-sign=FBEF43DC8C6BE9A7 --repo=/opt/pakrepo --force-clean .builddir flatpak.yml
flatpak build-bundle --arch=aarch64 /opt/pakrepo ./signal.flatpak org.signal.Signal master
cp ./signal.flatpak ~/
sha256sum signal.flatpak | tee -a checksums.txt
- name: checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: sync to gh-pages branch repo dir and commit
shell: bash
run: |
rsync -a --delete /opt/pakrepo/ ./repo/
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
git add repo
git commit -m "repo update"
git push
- name: clean up images for self-hosted runner
env:
VERSION: "7.20.0"
shell: bash
run: |
podman container rm signal-desktop-${{ env.VERSION }}
podman image rm localhost/signal-desktop-image-${{ env.VERSION }}:latest
- name: Upload release artifacts
env:
VERSION: "7.20.0"
uses: AButler/[email protected]
with:
release-tag: ${{ env.VERSION }}
files: "signal-desktop.deb;signal.flatpak;checksums.txt"
repo-token: ${{ secrets.GITHUB_TOKEN }}