Publish IPA releases from tags

This commit is contained in:
CelloSerenity 2026-08-01 09:24:12 -06:00
parent ea42d847d1
commit 22e34051ff

View file

@ -3,12 +3,19 @@ name: Build Debug IPA
on:
push:
branches: [ "main" ]
tags: [ "[0-9]*" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
inputs:
create_release:
description: Create a GitHub release from this ref
required: false
default: false
type: boolean
permissions:
contents: read
contents: write
jobs:
build:
@ -50,10 +57,40 @@ jobs:
zip -r StikDebug.ipa Payload
rm -rf Payload StikDebug.app
- name: 5. Store IPA as Workflow Artifact
if: env.UPLOAD_IPA == 'true'
- name: 5. Name workflow artifact
if: env.UPLOAD_IPA == 'true' && (github.event_name == 'push' || github.event_name == 'pull_request')
run: cp StikDebug.ipa StikDebug-${{ github.sha }}.ipa
- name: 6. Store IPA as Workflow Artifact
if: env.UPLOAD_IPA == 'true' && (github.event_name == 'push' || github.event_name == 'pull_request')
uses: actions/upload-artifact@v7
with:
name: StikDebug-Debug.ipa
path: StikDebug.ipa
path: StikDebug-${{ github.sha }}.ipa
archive: false
retention-days: 90
- name: Read version
id: version
if: startsWith(github.ref, 'refs/tags/') || inputs.create_release
run: |
version=$(xcodebuild -project StikDebug.xcodeproj -scheme StikDebug -showBuildSettings | awk -F ' = ' '/ MARKETING_VERSION = / { print $2; exit }')
test -n "$version"
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
test "${GITHUB_REF_NAME#v}" = "$version"
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Name release asset
if: startsWith(github.ref, 'refs/tags/') || inputs.create_release
run: mv StikDebug.ipa StikDebug-${{ steps.version.outputs.version }}.ipa
- name: Publish release
if: startsWith(github.ref, 'refs/tags/') || inputs.create_release
uses: softprops/action-gh-release@v2
with:
name: StikDebug ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref_type == 'tag' && github.ref_name || steps.version.outputs.version }}
target_commitish: ${{ github.sha }}
files: StikDebug-${{ steps.version.outputs.version }}.ipa
generate_release_notes: true
fail_on_unmatched_files: true