Skip to content

Fix CI

Fix CI #10

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*' # Trigger when pushing a tag like "v1.0.0"
permissions:
contents: write
jobs:
release:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install pkg-config opencv libimobiledevice libplist gh
- name: Configure
run: ./configure
- name: Build
run: make
- name: Test
run: make check
- name: Dist
run: make dist # Produces dist/ios_nsfw_scanner.tar.gz (adjust if needed)
- name: Rename Tarball and Compute SHA
id: tarball
run: |
# Extract the tag from GITHUB_REF (e.g. "v1.0.0")
VERSION="${GITHUB_REF##*/}"
# Rename the tarball to match your formula naming
mv dist/ipurity.tar.gz "dist/ipurity-${VERSION}.tar.gz"
# Compute SHA-256
SHA256=$(shasum -a 256 "dist/ipurity-${VERSION}.tar.gz" | cut -d' ' -f1)
echo "sha256=$SHA256" >> "$GITHUB_OUTPUT"
- name: Upload Asset to Existing Release
run: |
VERSION="${GITHUB_REF##*/}" # e.g. "v1.0.0"
# The release must already exist with this tag.
# --clobber overwrites the asset if it already exists.
gh release upload "$VERSION" "dist/ipurity-${VERSION}.tar.gz" --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}