chore: auto publish release on version tag

This commit is contained in:
Jackson Coxson
2026-05-11 07:51:18 -06:00
parent 9d4adbf6b7
commit ff9877f15a
+41
View File
@@ -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