Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
Small workflows' refactoring + Allow Preview Program for custom builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sn-o-w committed Oct 24, 2023
1 parent 32c6bba commit 08e84ae
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,16 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
uses: sn-o-w/cache-apt-pkgs-action@master
with:
packages: patchelf e2fsprogs python3 python3-pip aria2 p7zip-full attr unzip sudo whiptail qemu-utils
packages: lzip patchelf e2fsprogs python3 python3-pip aria2 p7zip-full attr unzip sudo whiptail qemu-utils
version: 1.0

- name: Install Lzip + Python venv & its libraries
- name: Install Python venv & its libraries
run: |
wget -P ./download/ http://ftp.debian.org/debian/pool/main/l/lzip/lzip_1.23-5_amd64.deb
sudo dpkg -i ./download/lzip_1.23-5_amd64.deb
python3 -c "import venv" >/dev/null 2>&1 || {
if ! (sudo apt-get install "python3-venv"); then
abort
Expand Down Expand Up @@ -73,4 +71,4 @@ jobs:
file: ./output/${{ steps.wsa.outputs.artifact }}.${{ matrix.compress-format }}
tag: ${{ steps.date.outputs.date }}
overwrite: true
file_glob: true
file_glob: true
27 changes: 17 additions & 10 deletions .github/workflows/custom_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
inputs:
arch:
type: choice
description: Architecture of WSA.
description: Target CPU architecture of WSA.
required: true
options: [x64, arm64]
default: x64
release-type:
type: choice
description: Release type of WSA. RP = Release Preview; WIS = Insider Slow; WIF = Insider Fast
description: Release type of WSA. RP=Release Preview; WIS=Insider Slow; WIF=Insider Fast; PP=Preview Program
required: true
options: ["retail","RP","WIS","WIF"]
options: ["retail","RP","WIS","WIF","PP"]
default: "retail"
magisk-ver:
type: choice
Expand Down Expand Up @@ -57,18 +57,16 @@ jobs:

steps:
- name: Checkout ♻️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Dependencies 🧑‍🏭
uses: awalsh128/cache-apt-pkgs-action@latest
uses: sn-o-w/cache-apt-pkgs-action@master
with:
packages: patchelf e2fsprogs python3 python3-pip aria2 p7zip-full attr unzip sudo whiptail qemu-utils
packages: lzip patchelf e2fsprogs python3 python3-pip aria2 p7zip-full attr unzip sudo whiptail qemu-utils
version: 1.0

- name: Install Lzip + Python venv & its libraries 🐍
- name: Install Python venv & its libraries 🐍
run: |
wget -P ./download/ http://ftp.debian.org/debian/pool/main/l/lzip/lzip_1.23-5_amd64.deb
sudo dpkg -i ./download/lzip_1.23-5_amd64.deb
python3 -c "import venv" >/dev/null 2>&1 || {
if ! (sudo apt-get install "python3-venv"); then
abort
Expand All @@ -85,13 +83,22 @@ jobs:
python3 -m pip install -r scripts/requirements.txt || abort "Failed to install python3 dependencies"
}
deactivate
if [[ "${{ inputs.release-type }}" == "PP" ]]; then
mkdir -p ./download/ >/dev/null 2>&1
tag=$(wget -O - "https://api.github.com/repos/MustardChef/WSAPackages/tags" | jq -r '.[0].name'); wget -O ./download/wsa-WIF.zip "/~https://github.com/MustardChef/WSAPackages/releases/download/${tag}/MicrosoftCorporationII.WindowsSubsystemForAndroid_${tag#WSA_}_neutral_._8wekyb3d8bbwe.Msixbundle"
fi
- name: Grant exec permission to script 👑
run: chmod +x ./scripts/build.sh

- name: Build WSA 🏗️
id: wsa
run: ./scripts/build.sh --arch ${{ inputs.arch }} --release-type ${{ inputs.release-type }} --magisk-ver ${{ inputs.magisk-ver }} --gapps-brand ${{ inputs.gapps-brand }} --gapps-variant ${{ inputs.gapps-variant }} --root-sol ${{ inputs.root-sol }} --remove-amazon --compress-format ${{ inputs.compress-format }}
run: |
if [[ "${{ inputs.release-type }}" == "PP" ]]; then
./scripts/build.sh --arch ${{ inputs.arch }} --release-type WIF --magisk-ver ${{ inputs.magisk-ver }} --gapps-brand ${{ inputs.gapps-brand }} --gapps-variant ${{ inputs.gapps-variant }} --root-sol ${{ inputs.root-sol }} --remove-amazon --skip-download-wsa --compress-format ${{ inputs.compress-format }}
else
./scripts/build.sh --arch ${{ inputs.arch }} --release-type ${{ inputs.release-type }} --magisk-ver ${{ inputs.magisk-ver }} --gapps-brand ${{ inputs.gapps-brand }} --gapps-variant ${{ inputs.gapps-variant }} --root-sol ${{ inputs.root-sol }} --remove-amazon --compress-format ${{ inputs.compress-format }}
fi
- name: Upload Artifact 🤌
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 08e84ae

Please sign in to comment.