From ff9877f15a54b7b96839e288183a36875a6e6000 Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Mon, 11 May 2026 07:51:18 -0600 Subject: [PATCH] chore: auto publish release on version tag --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b6b60c..7cf16a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ name: CI on: push: branches: [master] + tags: ['v*.*.*'] pull_request: workflow_dispatch: @@ -250,3 +251,43 @@ jobs: name: idevice-tools-windows path: dist\*.exe if-no-files-found: error + + release: + name: Release + if: startsWith(github.ref, 'refs/tags/v') + needs: [macos, linux, windows] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download tool artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + pattern: idevice-tools-* + + - name: Download xcframework + uses: actions/download-artifact@v4 + with: + name: idevice-xcframework + path: artifacts/idevice-xcframework + + - name: Package release archives + shell: bash + run: | + set -euo pipefail + mkdir -p release + tag="${GITHUB_REF_NAME}" + for dir in artifacts/idevice-tools-*; do + name="$(basename "$dir")" + (cd "$dir" && zip -r "${GITHUB_WORKSPACE}/release/${name}-${tag}.zip" .) + done + cp artifacts/idevice-xcframework/bundle.zip "release/idevice-xcframework-${tag}.zip" + ls -la release + + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + files: release/* + fail_on_unmatched_files: true + generate_release_notes: true