Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #173

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #173

Workflow file for this run

name: Build yacd
on: [workflow_dispatch,push]
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip-ci')"
strategy:
fail-fast: false
matrix:
arch:
- x86_64
- x86
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Get build config
id: buildconfig
shell: bash
run: |
source ./.env
echo "::set-output name=pongo::${PONGO_LATEST}"
-
name: Install build dependencies
run: |
source ./.env
echo 'deb https://assets.checkra.in/debian /' | sudo tee /etc/apt/sources.list.d/checkra1n.list
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' | sudo tee /etc/apt/sources.list.d/llvm.list
echo 'deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main' | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-key adv --fetch-keys https://assets.checkra.in/debian/archive.key
sudo apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key
sudo apt-get update
sudo apt-get install -y --no-install-recommends wget debootstrap grub-pc-bin \
grub-efi-amd64-bin mtools xorriso ca-certificates curl \
libusb-1.0-0-dev gcc make gzip unzip libc6-dev xz-utils ld64 cctools-strip rename
sudo apt-get install -y clang-format clang-tidy clang-tools clang clangd libc++-dev \
libc++1 libc++abi-dev libc++abi1 libclang-dev libclang1 liblldb-dev libllvm-ocaml-dev \
libomp-dev libomp5 lld lldb llvm-dev llvm-runtime llvm python-clang
brew install zstd
-
name: Building squashfs-tools with zstd support
run: |
git clone --depth 1 https://github.com/plougher/squashfs-tools
sudo ln -sf $(brew --prefix zstd)/lib/libzstd.so.1.5.2 /usr/lib/x86_64-linux-gnu/libzstd.so
sudo ln -sf $(brew --prefix zstd)/lib/libzstd.so.1.5.2 /usr/lib/x86_64-linux-gnu/libzstd.so.1.5.2
(
cd squashfs-tools/squashfs-tools
sed -i "s/#ZSTD_SUPPORT = 1/ZSTD_SUPPORT = 1/;s/COMP_DEFAULT = gzip/COMP_DEFAULT = zstd/" Makefile
sed -i 's/INCLUDEDIR = -I./INCLUDEDIR := -I. -I$(shell brew --prefix zstd)\/include -L$(shell brew --prefix zstd)\/lib/' Makefile
make
sudo make install
)
-
name: Building pongoOS
if: "contains(steps.buildconfig.outputs.pongo, 'YES')"
run: |
(
cd assets
git clone --recursive --depth 1 https://github.com/checkra1n/pongoOS
cd pongoOS
make all
)
-
name: Download odysseyra1n resources
run: |
source ./.env
[ -z "$SILEO" ] && {
SILEO="https://github.com$(curl -s https://github.com/Sileo/Sileo/releases | grep -Po "/Sileo\/Sileo/releases/download/[\d.]+/org\.coolstar\.sileo_[\d.]+_iphoneos-arm\.deb" | head -1)"
}
mkdir -p assets/odysseyra1n
(
cd assets/odysseyra1n
curl -sL -O https://github.com/coolstar/Odyssey-bootstrap/raw/master/bootstrap_1500.tar.gz \
-O https://github.com/coolstar/Odyssey-bootstrap/raw/master/bootstrap_1600.tar.gz \
-O https://github.com/coolstar/Odyssey-bootstrap/raw/master/bootstrap_1700.tar.gz \
-O "$SILEO" \
-O https://github.com/coolstar/Odyssey-bootstrap/raw/master/org.swift.libswift_5.0-electra2_iphoneos-arm.deb
gzip -dv ./*.tar.gz
tar -vc ./* | zstd -zcT0 --ultra -22 > odysseyra1n_resources.tar.zst
find ./* -not -name "odysseyra1n_resources.tar.zst" -delete
)
-
name: Build
run: |
sed -i "s/ARCH=''/ARCH='${{ matrix.arch }}'/" .env
sudo chmod 755 build.sh
sudo -E ./build.sh
-
name: Upload artifacts
uses: actions/upload-artifact@v2
with:
path: out/*
upload-prerelease:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' # Only upload prereleases when it gets merged to main
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Download artifacts
uses: actions/download-artifact@v4.1.7
-
name: Get version information
run: |
source ./.env
echo "version=$VERSION" >> $GITHUB_ENV
echo "name=$NAME" >> $GITHUB_ENV
echo "todayDate=$(date +%Y%m%dT%H%M%SZ)" >> $GITHUB_ENV
-
name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.todayDate }}
release_name: Prerelease ${{ env.todayDate }}
draft: false
prerelease: true
-
name: Attach binaries to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
todayDate: ${{ env.todayDate }}
version: ${{ env.version }}
name: ${{ env.name }}
run: |
set -x
mv ./artifact/$name-$version-x86_64.iso ./artifact/$name-$todayDate-x86_64.iso
mv ./artifact/$name-$version-x86.iso ./artifact/$name-$todayDate-x86.iso
assets=()
for asset in ./artifact/*; do
assets+=("-a" "$asset")
done
hub release edit "${assets[@]}" -m "This is an automated build based on the latest code. Use with caution." $todayDate