Release #12
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
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'tag/version' | |
required: true | |
default: '1.0.0' | |
action_tag: | |
description: 'create tag ("no" to skip)' | |
required: true | |
default: 'yes' | |
release_AEPAssurance: | |
description: 'release AEPAssurance to Cocoapods ("no" to skip)' | |
required: true | |
default: 'yes' | |
jobs: | |
release_assurance: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '14.1' | |
- name: Install jq | |
run: brew install jq | |
- name: Install cocoapods | |
run: gem install cocoapods | |
- 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 Artifact | |
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 Artifact | |
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/AEPAssurance.xcframework.zip | |
asset_name: AEPAssurance-${{ github.event.inputs.tag }}.xcframework.zip | |
asset_content_type: application/zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Pods - AEPAssurance | |
if: ${{ github.event.inputs.release_AEPAssurance == 'yes' }} | |
run: | | |
set -eo pipefail | |
pod trunk push AEPAssurance.podspec --allow-warnings --swift-version=5.1 | |
env: | |
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} |