mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-16 04:20:30 +00:00
Publish IPA releases from tags
This commit is contained in:
parent
ea42d847d1
commit
22e34051ff
1 changed files with 42 additions and 5 deletions
47
.github/workflows/build_ipa.yml
vendored
47
.github/workflows/build_ipa.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue