Skip to content

Release

Release #7

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_AEPMedia:
description: 'release AEPMedia ("no" to skip)'
required: true
default: 'yes'
jobs:
release_media:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- 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: Pod repo update
run: |
pod repo update
- 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 - AEPMedia
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/AEPMedia.xcframework.zip
asset_name: AEPMedia-${{ github.event.inputs.tag }}.xcframework.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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: Publish Pods - AEPMedia
if: ${{ github.event.inputs.release_AEPMedia == 'yes' }}
run: |
set -eo pipefail
pod trunk push AEPMedia.podspec --allow-warnings --synchronous --swift-version=5.1
pod repo update
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}