-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Migrate to GitHub Actions reusable workflows (#62)
* Implement update versions workflow using reusable workflow * Migrate release workflow to reusable workflow * Migrate CI to GHA reusable workflow * Enable codecov * bundle install with 2.5.23 * Update AEPTestUtils to 5.2.2 (Core) * Update functional tests to use longer default timeout Update TestBase logging property usage * Increase default timeout from 10 -> 15 sec * Update Gemfile cocoapods to 1.16.2 * Replace deprecated API usage
- Loading branch information
1 parent
31e65b7
commit f26c8a6
Showing
15 changed files
with
295 additions
and
389 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# | ||
# Copyright 2024 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
# | ||
|
||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build-and-test: | ||
name: "CI" | ||
uses: adobe/aepsdk-commons/.github/workflows/[email protected] | ||
with: | ||
ios-device-names: '["iPhone 15"]' | ||
ios-versions: '["18.1"]' | ||
tvos-device-names: '["Apple TV"]' | ||
tvos-versions: '["18.1"]' | ||
run-test-ios-unit: true | ||
run-test-ios-functional: true | ||
run-test-ios-integration: true | ||
run-test-tvos-unit: true | ||
run-test-tvos-functional: true | ||
run-test-tvos-integration: true | ||
run-build-xcframework-and-app: true | ||
enable-codecov: true | ||
secrets: inherit |
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,97 +1,44 @@ | ||
# | ||
# Copyright 2024 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
# | ||
|
||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'tag/version' | ||
description: 'The tag (version) to be released (ex: 1.2.3).' | ||
type: string | ||
required: true | ||
default: '1.0.0' | ||
|
||
action_tag: | ||
description: 'create tag ("no" to skip)' | ||
create-github-release: | ||
description: 'Create a GitHub release with uploaded artifacts. If the provided `tag` does not exist, it will be created.' | ||
type: boolean | ||
required: true | ||
default: 'yes' | ||
default: true | ||
|
||
release_AEPEdgeMedia: | ||
description: 'release AEPEdgeMedia to Cocoapods ("no" to skip)' | ||
pod-publish-extensions: | ||
description: 'Publish AEPEdgeMedia to Cocoapods.' | ||
type: boolean | ||
required: true | ||
default: 'yes' | ||
|
||
default: true | ||
jobs: | ||
release_edgemedia: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '15.0.1' | ||
|
||
- name: Install jq | ||
run: brew install jq | ||
|
||
- name: Install cocoapods | ||
run: gem install cocoapods | ||
|
||
- name: Install xcodegen | ||
run: brew install xcodegen | ||
|
||
- name: Check version in Podspec | ||
run: | | ||
set -eo pipefail | ||
echo Target version: ${{ github.event.inputs.tag }} | ||
make check-version VERSION=${{ github.event.inputs.tag }} | ||
- name: SPM integration test | ||
if: ${{ github.event.inputs.action_tag == 'yes' }} | ||
run: | | ||
set -eo pipefail | ||
echo SPM integration test starts: | ||
make test-SPM-integration | ||
- name: podspec file verification | ||
if: ${{ github.event.inputs.action_tag == 'yes' }} | ||
run: | | ||
set -eo pipefail | ||
echo podspec file verification starts: | ||
make test-podspec | ||
- name: Build Artifacts | ||
if: ${{ github.event.inputs.action_tag == 'yes' }} | ||
run: | | ||
make archive | ||
make zip | ||
- name: Create GH Release | ||
id: create_release | ||
uses: release-drafter/release-drafter@v5 | ||
if: ${{ github.event.inputs.action_tag == 'yes' }} | ||
with: | ||
name: v${{ github.event.inputs.tag }} | ||
tag: ${{ github.event.inputs.tag }} | ||
version: ${{ github.event.inputs.tag }} | ||
publish: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload - AEPEdgeMedia | ||
uses: actions/upload-release-asset@v1 | ||
if: ${{ github.event.inputs.action_tag == 'yes' }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./build/AEPEdgeMedia.xcframework.zip | ||
asset_name: AEPEdgeMedia-${{ github.event.inputs.tag }}.xcframework.zip | ||
asset_content_type: application/zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish Pods - AEPEdgeMedia | ||
if: ${{ github.event.inputs.release_AEPEdgeMedia == 'yes' }} | ||
run: | | ||
set -eo pipefail | ||
pod trunk push AEPEdgeMedia.podspec --allow-warnings --synchronous | ||
pod repo update | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
release: | ||
permissions: | ||
contents: write | ||
uses: adobe/aepsdk-commons/.github/workflows/[email protected] | ||
with: | ||
tag: ${{ github.event.inputs.tag }} | ||
create-github-release: ${{ github.event.inputs.create-github-release == 'true' && 'AEPEdgeMedia' || '' }} | ||
pod-publish-extensions: ${{ github.event.inputs.pod-publish-extensions == 'true' && 'AEPEdgeMedia' || '' }} | ||
version-validation-paths: AEPEdgeMedia.podspec, AEPEdgeMedia.xcodeproj/project.pbxproj, Sources/MediaConstants.swift | ||
secrets: inherit |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# Copyright 2024 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
# | ||
|
||
name: Update Versions | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'The new version to use for the extension (ex: 1.2.3).' | ||
type: string | ||
required: true | ||
|
||
branch: | ||
description: 'The target branch where the version update will be applied and the pull request will be merged into.' | ||
type: string | ||
required: true | ||
|
||
core-dependency: | ||
description: 'If a version is provided, update AEPCore dependency in podspec and Package.swift.' | ||
type: string | ||
required: false | ||
default: '' | ||
|
||
edge-dependency: | ||
description: 'If a version is provided, update AEPEdge dependency in podspec and Package.swift.' | ||
type: string | ||
required: false | ||
default: '' | ||
|
||
jobs: | ||
update-versions: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
uses: adobe/aepsdk-commons/.github/workflows/[email protected] | ||
with: | ||
version: ${{ github.event.inputs.version }} | ||
branch: ${{ github.event.inputs.branch }} | ||
dependencies: AEPCore ${{ github.event.inputs.core-dependency }}, AEPEdge ${{ github.event.inputs.edge-dependency }} | ||
paths: Package.swift:swift_spm, AEPEdgeMedia.podspec, AEPEdgeMedia.xcodeproj/project.pbxproj, Sources/MediaConstants.swift | ||
update: true |
Oops, something went wrong.