Build and Release AppBundles #11
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 Packages | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and Release Packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/[email protected] | |
# Find and run all build scripts inside ./programs/* | |
- name: Run build scripts for all architectures | |
run: | | |
# Set output directory | |
export OUT_DIR="$HOME/out" | |
mkdir -p "$OUT_DIR" | |
cd "$OUT_DIR" | |
DBIN_PGRS="dwarfs-tools bwrap-patched" | |
export GOBIN="$HOME/.local/bin" | |
mkdir -p "$HOME/.local/bin" | |
git clone --depth 1 --branch dev https://github.com/xplshn/pelf | |
cp ./pelf/pelf* ~/.local/bin | |
cp ./pelf/cmd/misc/* ~/.local/bin | |
cd pelf/cmd/pelfd | |
go build -o "$GOBIN/pelfd" | |
cd ../dynexec/lib4bin | |
go build -o "$GOBIN/lib4bin" | |
wget -qO- "https://raw.githubusercontent.com/xplshn/dbin/master/stubdl" | sh -s -- --install "$HOME/.local/bin/dbin" add $DBIN_PGRS && \ | |
export PATH="$HOME/.local/bin:$PATH" && { | |
ln -sfT "$HOME/.local/bin/dwarfs-tools" "$HOME/.local/bin/mkdwarfs" | |
ln -sfT "$HOME/.local/bin/dwarfs-tools" "$HOME/.local/bin/dwarfs" | |
ln -sfT "$HOME/.local/bin/bwrap-patched" "$HOME/.local/bin/bwrap" | |
} | |
# Iterate over build scripts in programs/* | |
for dir in ./recipes/*; do | |
if [ -d "$dir" ]; then | |
for script in "$dir"/*; do | |
if [ -x "$script" ]; then | |
echo "Running $script..." | |
$script | |
else | |
echo "$script is not executable, skipping." | |
fi | |
done | |
fi | |
done | |
# Create GitHub Release | |
- name: Create Release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
title: "Weekly Release - Run ${{ github.run_id }}" | |
automatic_release_tag: weekly-release-${{ github.run_id }} | |
prerelease: false | |
draft: false | |
files: | | |
$HOME/out/* | |
repo_token: ${{ secrets.GITHUB_TOKEN }} |