forked from ResearchKit/ResearchKit
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use reusable GitHub workflows for archiving and creating the XCFramew…
…ork (#9) # Use template GitHub workflows for archiving and creating the XCFramework ## ♻️ Current situation & Problem In StanfordBDHG/.github#40, we introduced reusable GitHub Actions workflows for the archiving and creation of XCFrameworks. This enables us to avoid code duplication. ## ⚙️ Release Notes - GitHub Actions workflow utilizes shared reusable workflows. - ResearchKit updated to latest version v2.2.12 ## 📚 Documentation Provided in the workflow files ## ✅ Testing Manually tested by creating an example release of ResearchKit. ### Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md): - [X] I agree to follow the [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md). --------- Co-authored-by: Pariece McKinney <[email protected]> Co-authored-by: philippzagar <[email protected]>
- Loading branch information
1 parent
9530fad
commit 23ce5f2
Showing
112 changed files
with
2,235 additions
and
1,645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,33 @@ | ||
name: Release | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Group open-source organization | ||
# | ||
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
on: | ||
name: Create XCFramework and Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'The version number that should be used to tag the release' | ||
description: 'The version number of the framework embedded in the XCArchives. This version number is also used for the release tag.' | ||
type: string | ||
required: true | ||
configuration: | ||
description: 'The build configuration to use when archiving the scheme, either Debug or Release.' | ||
type: string | ||
required: false | ||
default: 'Release' | ||
|
||
jobs: | ||
build-xcarchive: | ||
name: Build XCArchive | ||
uses: ./.github/workflows/build.yml | ||
create-xcframework-and-release-workflow: | ||
uses: StanfordBDHG/.github/.github/workflows/xcframework.yml@v2 | ||
with: | ||
workspaceFile: 'RKWorkspace.xcworkspace' | ||
xcFrameworkName: 'ResearchKit' | ||
scheme: 'ResearchKit' | ||
version: ${{ inputs.version }} | ||
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 | ||
configuration: ${{ inputs.configuration }} | ||
runsonlabels: '["macOS", "self-hosted"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+560 Bytes
(100%)
ResearchKit.xcframework/ios-arm64/ResearchKit.framework/Assets.car
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-64 Bytes
(92%)
ResearchKit.xcframework/ios-arm64/ResearchKit.framework/Info.plist
Binary file not shown.
Oops, something went wrong.