This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
Autobuild for 7.14.0,branch 7.14.x #138
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 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.14.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: sync to server | |
shell: bash | |
run: | | |
rsync -azu --delete /opt/pakrepo/ server:/var/www/htdocs/elagost.com/flatpak/repo/ | |
rsync -z ~/signal-desktop.deb server:/var/www/htdocs/elagost.com/flatpak/ | |
rsync -z ~/signal.flatpak server:/var/www/htdocs/elagost.com/flatpak/ | |
- name: clean up images for self-hosted runner | |
env: | |
VERSION: "7.14.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.14.0" | |
uses: AButler/[email protected] | |
with: | |
release-tag: ${{ env.VERSION }} | |
files: "signal-desktop.deb;signal.flatpak;checksums.txt" | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |