forked from ResearchKit/ResearchKit
-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (54 loc) · 1.76 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'The version number that should be used to tag the release'
type: string
required: true
jobs:
build-xcarchive:
name: Build XCArchive
uses: ./.github/workflows/build.yml
create-xcframework:
name: Build XCFramework
runs-on: macos-13
needs: build-xcarchive
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Check environment
run: |
xcodebuild -version
swift --version
echo Release version: ${{ inputs.version }}
- uses: actions/download-artifact@v3
with:
path: ./.build
- name: Create XCFramework
run: |
rm -rf ResearchKit.xcframework
xcodebuild -create-xcframework \
-framework ./.build/ResearchKit-iphoneos.xcarchive/Products/Library/Frameworks/ResearchKit.framework \
-framework ./.build/ResearchKit-iphonesimulator.xcarchive/Products/Library/Frameworks/ResearchKit.framework \
-output ResearchKit.xcframework
rm -rf .build
- name: Commit and push XCFramework
uses: EndBug/add-and-commit@v9
with:
add: ResearchKit.xcframework
message: Create XCFramework for release ${{ inputs.version }}
tag: '${{ inputs.version }} --force'
tag_push: '--force'
- name: Create Artifacts
run: |
tar -zcvf ResearchKit.xcframework.tar.gz ResearchKit.xcframework
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.version }}
generate_release_notes: true
fail_on_unmatched_files: true
files: ResearchKit.xcframework.tar.gz