Skip to content

Update tweaks

Update tweaks #11

Workflow file for this run

name: Build Binaries
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
binary_src: ipa-edit.exe
binary_dest: ipa-edit.exe
zip_name: iPA-Edit-windows-x64.zip
- os: macos-latest
binary_src: ipa-edit
binary_dest: ipa-edit
zip_name: iPA-Edit-macOS-x64.zip
- os: ubuntu-latest
binary_src: ipa-edit
binary_dest: ipa-edit
zip_name: iPA-Edit-linux-x64.zip
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install pyinstaller
- name: Build binary
run: |
pyinstaller \
--onefile \
--name ipa-edit \
--clean \
--collect-all modules \
ipa-edit.py
- name: Package (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$pkg = "staging\iPA-Edit"
New-Item -ItemType Directory -Force -Path $pkg | Out-Null
# Docs & signing tool
Copy-Item README.md "$pkg\README.md"
Copy-Item -Recurse zsign "$pkg\zsign"
# Empty placeholder directories
New-Item -ItemType Directory -Force -Path "$pkg\certificate" | Out-Null
New-Item -ItemType Directory -Force -Path "$pkg\tweaks" | Out-Null
New-Item -ItemType Directory -Force -Path "$pkg\Signed" | Out-Null
New-Item -ItemType Directory -Force -Path "$pkg\Unsigned" | Out-Null
# Place compiled executable
Copy-Item dist\${{ matrix.binary_src }} "$pkg\${{ matrix.binary_dest }}"
Compress-Archive -Path staging\iPA-Edit -DestinationPath ${{ matrix.zip_name }}
- name: Package (Unix)
if: runner.os != 'Windows'
run: |
PKG="staging/iPA-Edit"
mkdir -p "$PKG"
# Docs & signing tool
cp README.md "$PKG/"
cp -r zsign "$PKG/zsign"
# Empty placeholder directories
mkdir -p "$PKG/certificate" "$PKG/tweaks" "$PKG/Signed" "$PKG/Unsigned"
# Place compiled executable
cp dist/${{ matrix.binary_src }} "$PKG/${{ matrix.binary_dest }}"
chmod +x "$PKG/${{ matrix.binary_dest }}"
cd staging && zip -r ../${{ matrix.zip_name }} iPA-Edit/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.zip_name }}
path: ${{ matrix.zip_name }}
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Compute checksums
id: hashes
run: |
WIN=$(sha256sum "dist/iPA-Edit-windows-x64.zip" | awk '{print $1}')
MAC=$(sha256sum "dist/iPA-Edit-macOS-x64.zip" | awk '{print $1}')
LIN=$(sha256sum "dist/iPA-Edit-linux-x64.zip" | awk '{print $1}')
echo "win=$WIN" >> $GITHUB_OUTPUT
echo "mac=$MAC" >> $GITHUB_OUTPUT
echo "lin=$LIN" >> $GITHUB_OUTPUT
- name: Get previous tag
id: prev
run: |
PREV=$(git tag --sort=-version:refname | grep -v "^${{ github.ref_name }}$" | head -n1)
echo "tag=$PREV" >> $GITHUB_OUTPUT
- name: Generate changelog
id: log
run: |
if [ -n "${{ steps.prev.outputs.tag }}" ]; then
LOG=$(git log ${{ steps.prev.outputs.tag }}..${{ github.ref_name }} \
--pretty=format:"- %s ([%h](https://github.com/${{ github.repository }}/commit/%H))" \
--no-merges)
else
LOG=$(git log --pretty=format:"- %s ([%h](https://github.com/${{ github.repository }}/commit/%H))" \
--no-merges | head -20)
fi
echo "entries<<EOF" >> $GITHUB_OUTPUT
echo "$LOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Build release notes
run: |
DATE=$(date -u '+%Y-%m-%d')
cat > notes.md << MD
## iPA Edit ${{ github.ref_name }}
> Released on **${DATE}**
---
### 📦 Downloads
| Platform | File | SHA-256 |
|:--|:--|:--|
| 🪟 Windows x64 | \`iPA-Edit-windows-x64.zip\` | \`${{ steps.hashes.outputs.win }}\` |
| 🍎 macOS x64 | \`iPA-Edit-macOS-x64.zip\` | \`${{ steps.hashes.outputs.mac }}\` |
| 🐧 Linux x64 | \`iPA-Edit-linux-x64.zip\` | \`${{ steps.hashes.outputs.lin }}\` |
> Extract the zip and run the executable directly. Place your \`.p12\` + \`.mobileprovision\` in \`certificate/\` and tweaks in \`tweaks/\`.
> **macOS / Linux:** run \`chmod +x ipa-edit\` on first use.
---
### 🔄 What's Changed
${{ steps.log.outputs.entries }}
---
<p align="center">
Made with ❤️ by <a href="https://github.com/SHAJON-404">SHAJON-404</a> · <a href="https://shajon.dev">shajon.dev</a>
</p>
MD
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: notes.md
files: |
dist/iPA-Edit-windows-x64.zip
dist/iPA-Edit-macOS-x64.zip
dist/iPA-Edit-linux-x64.zip
draft: false
prerelease: false