Skip to content

Release

Release #173

Workflow file for this run

name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+**"
env:
BUNDLE_PATH: vendor/bundle
jobs:
check-version:
if: github.repository == 'urbanairship/ios-library'
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v4
- name: Get the version
id: get_version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Check Version
run: bash ./scripts/check_version.sh ${{ steps.get_version.outputs.VERSION }}
- name: Slack Notification
uses: lazy-actions/slatify@master
with:
type: ${{ job.status }}
job_name: "iOS SDK Release Started :apple_og:"
url: ${{ secrets.SLACK_WEBHOOK }}
build-package:
needs: check-version
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v4
- name: Install Coreutils
run: brew install coreutils
- name: Install Apple Certificate
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.CERTIFICATEXC }}
p12-password: ${{ secrets.CERTIFICATEXC_PASS }}
- name: Build SDK
run: make build-package
- name: Upload zip distribution
uses: actions/upload-artifact@v3
with:
name: airship
path: ./build/Airship.zip
- name: Upload zip distribution
uses: actions/upload-artifact@v3
with:
name: airship-carthage
path: ./build/Airship.xcframeworks.zip
- name: Upload Documentation
uses: actions/upload-artifact@v3
with:
name: docs
path: ./build/Documentation
build-samples:
needs: check-version
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v4
- name: Build samples
run: make build-samples
run-tests:
needs: check-version
runs-on: macos-14-xlarge
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install xcodegen
run: brew install xcodegen
- name: Install yeetd
run: |
wget https://github.com/biscuitehh/yeetd/releases/download/1.0/yeetd-normal.pkg
sudo installer -pkg yeetd-normal.pkg -target /
yeetd &
- name: Test
run: make test
deploy-github:
permissions:
contents: write
runs-on: macos-14-xlarge
needs: [run-tests, build-package, build-samples]
steps:
- uses: actions/checkout@v4
- name: Get the version
id: get_version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Get the release notes
id: get_release_notes
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
NOTES="$(awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md)"
NOTES="${NOTES//'%'/%25}"
NOTES="${NOTES//$'\n'/%0A}"
NOTES="${NOTES//$'\r'/%0D}"
echo ::set-output name=NOTES::"$NOTES"
- name: Download zip distribution
uses: actions/download-artifact@v3
with:
name: airship
path: ./build
- name: Download Carthage zip distribution
uses: actions/download-artifact@v3
with:
name: airship-carthage
path: ./build
- name: Github Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.get_release_notes.outputs.NOTES }}
draft: false
prerelease: false
files: |
./build/Airship.zip
./build/Airship.xcframeworks.zip
- name: Kickoff prebuilt repo
env:
GITHUB_TOKEN: ${{ secrets.IOS_DEPLOY_PREBUILT_PAT }}
run: gh --repo urbanairship/ios-library-prebuilt workflow run release.yml
deploy-pods:
runs-on: macos-14-xlarge
needs: [run-tests, build-package, build-samples]
steps:
- uses: actions/checkout@v4
- name: Get the version
id: get_version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Publish Pods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: make pod-publish
- name: Slack Notification
uses: lazy-actions/slatify@master
if: always()
with:
type: ${{ job.status }}
job_name: "Publish the Pods ${{ steps.get_version.outputs.VERSION }} :tidepod:"
url: ${{ secrets.SLACK_WEBHOOK }}
deploy-docs:
runs-on: macos-14-xlarge
needs: [run-tests, build-package, build-samples]
steps:
- uses: actions/checkout@v4
- name: Get the version
id: get_version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Download docs
uses: actions/download-artifact@v3
with:
name: docs
path: ./build/Documentation
- name: Setup GCP Auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Upload Docs
run: bash ./scripts/upload_docs.sh
- name: Slack Notification
uses: lazy-actions/slatify@master
if: always()
with:
type: ${{ job.status }}
job_name: "Uploaded iOS SDK API docs :female-doctor: :male-doctor:"
url: ${{ secrets.SLACK_WEBHOOK }}
finished:
runs-on: ubuntu-latest
needs: [deploy-github, deploy-pods, deploy-docs]
steps:
- name: Get the version
id: get_version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Slack Notification
uses: lazy-actions/slatify@master
if: always()
with:
type: ${{ job.status }}
job_name: ":raised_hands: iOS SDK Released! :raised_hands:"
url: ${{ secrets.SLACK_WEBHOOK }}