mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-05-17 20:20:34 +00:00
chore: auto publish release on version tag
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user