dan-says-build #123
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_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} | |
#} |