Skip to content

dan-says-build

dan-says-build #123

name: build_and_release
on:
workflow_dispatch:
# Allows Dan to trigger synchronization,
# which then triggers snaps to build
repository_dispatch:
types: dan-says-build
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set Timezone
run: |
# Set timezone to America/Los_Angeles so the build date is aligned with official builds
sudo sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y git python3-pip python3-setuptools patchelf fakeroot gettext
sudo -H pip3 install pyopenssl --upgrade
sudo -H pip3 install git+https://github.com/AppImageCrafters/appimage-builder.git
arch=$(uname -m)
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${arch}.AppImage -O /usr/bin/appimagetool
sudo chmod +x /usr/bin/appimagetool
- name: Build AppImage
run: |
chmod +x ./build.sh
./build.sh
- name: Release
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
artifacts=Chirp-*.AppImage
tag=$(date +%Y%m%d)
(cd chirp; git log -5 > ../last_5_commits.txt)
gh release create --latest ${tag} -t ${tag} -F last_5_commits.txt ${artifacts}
#if(!($?)) {
# # gh release create failed, try gh release upload instead
# gh release upload --clobber ${tag} ${artifacts}
#}