Skip to content

Release

Release #3

Workflow file for this run

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_AEPEdgeMedia:
description: 'release AEPEdgeMedia to Cocoapods ("no" to skip)'
required: true
default: 'yes'
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 }}