Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/release-drafter.yml

This file was deleted.

100 changes: 0 additions & 100 deletions .github/workflows/cd.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Create GitHub Release

# This workflow creates a GitHub release in iOS-SDK and attaches the built zip files.
# Runs automatically when a release PR is merged.

on:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good suggestion. We have a chance in this process to manually test releases before pushing out to package managers, but that happens after this workflow, so this one can be run automatically

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in 9bef2c6

pull_request:
types:
- closed
branches:
- main
- '*-main' # Matches version branches like 5.3-main

permissions:
contents: write
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Step 1: Extract version from podspec
get-version:
if: |
github.event.pull_request.merged == true &&
contains(github.event.pull_request.title, 'Release')
runs-on: ubuntu-latest
outputs:
version: ${{ steps.extract_version.outputs.version }}
steps:
- name: Checkout OneSignal-iOS-SDK
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: Extract release version from podspec
id: extract_version
run: |
VERSION=$(grep -E "s.version\s*=" OneSignal.podspec | sed -E 's/.*"(.*)".*/\1/')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"

# Step 2: Use reusable workflow to create GitHub release with release notes
create-release:
needs: get-version
uses: OneSignal/sdk-actions/.github/workflows/github-release.yml@main
with:
version: ${{ needs.get-version.outputs.version }}

# Step 3: Upload the 10 xcframework zips to the release
upload-assets:
needs: [get-version, create-release]
runs-on: ubuntu-latest

env:
VERSION: ${{ needs.get-version.outputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout OneSignal-iOS-SDK
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: 📋 Display Configuration
run: |
echo "============================================"
echo "📦 Uploading assets for version: $VERSION"
echo "============================================"

- name: Upload xcframework zips to release
run: |
cd iOS_SDK/OneSignalSDK

gh release upload "$VERSION" \
OneSignalCore.xcframework.zip \
OneSignalExtension.xcframework.zip \
OneSignalFramework.xcframework.zip \
OneSignalInAppMessages.xcframework.zip \
OneSignalLiveActivities.xcframework.zip \
OneSignalLocation.xcframework.zip \
OneSignalNotifications.xcframework.zip \
OneSignalOSCore.xcframework.zip \
OneSignalOutcomes.xcframework.zip \
OneSignalUser.xcframework.zip

echo "✅ All xcframework zips uploaded successfully!"
echo "🔗 https://github.com/${{ github.repository }}/releases/tag/$VERSION"
Loading
Loading