Skip to content

Conversation

@nan-li
Copy link
Contributor

@nan-li nan-li commented Nov 3, 2025

Description

One Line Summary

Update release workflow for version bumps, building, creating GitHub releases, pushing to XCFramework repository, and pushing to Cocoapods.

Details - Workflow steps:

1. Create Release PR (create-release-prs.yml)

  • Automates version bumps
  • Create PR in OneSignal-iOS-SDK
  • Create PR in OneSignal-XCFramework SDK

⏸️ Action Needed: Approve and merge PRs

2. Create GitHub Release in OneSignal-iOS-SDK (create_github_release.yml)

  • Makes release on GitHub and attaches the 10 generated xcframework zip files.
  • We can test at this point before pushing to Cocoapods

⏸️ Action Needed (optional): Here is chance to test releases before pushing out to package managers

3. Release SDK (publish-release.yml)

  • Push to cocoapods with OneSignal and OneSignalXCFramework
  • Make OneSignal-XCFramework release for Swift Package Manager

See #1613 and OneSignal/OneSignal-XCFramework#133 for example release PRs.

Motivation

Automate release workflow

Scope

Release workflow

Testing

Manual testing

Testing through manual triggers

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

These methods are unused, leftover dead code.
@nan-li nan-li force-pushed the chore/cd_create_release_pr branch 5 times, most recently from fdb343a to e1d53ad Compare November 6, 2025 16:21
@nan-li nan-li requested a review from a team November 6, 2025 16:22
@nan-li nan-li force-pushed the chore/cd_create_release_pr branch 6 times, most recently from 3721793 to 1f7a8b5 Compare November 10, 2025 21:18
* This script will read the VERSION and update the 2 podspec files and the ONESIGNAL_VERSION's in the SDK
* Add this to the CD script as a step.
* This is similar to existing scripts `update_swift_package.sh` and `build_all_frameworks.sh`
- Also, rename cd.yml to create-release-prs.yml for clarity
Creates GH release for OneSignal-iOS-SDK.
Does not create release for OneSignal-XCFramework
* Pushes OneSignal and OneSignalXCFramework pods
* Takes the release notes from OneSignal-iOS-SDK and makes a release XCFramework
* For release automation workflow, we copy Package.swift to the XCFramework repository and rename the package name from "OneSignalFramework" to "OneSignalXCFramework". Since there are multiple occurrances of `name: "OneSignalFramework"` in this file, we ONLY want to change line 7!
@nan-li nan-li force-pushed the chore/cd_create_release_pr branch from 1f7a8b5 to 6d39e2f Compare November 10, 2025 21:30
# Step 3: Upload the 10 xcframework zips to the release
upload-assets:
needs: [get-version, create-release]
runs-on: macos-13

Choose a reason for hiding this comment

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

oh you are using two instances? why dont do everything in one isntance?

Copy link
Contributor

Choose a reason for hiding this comment

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

Id imagine for this upload job, ubuntu should work?

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 thats right, the files being uploaded are already built so it doesn't need macos

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 e637e88

echo "This release corresponds to [OneSignal-iOS-SDK $VERSION](https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/$VERSION)" >> release_notes.md
fi

# Determine if this is a pre-release

Choose a reason for hiding this comment

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

all this should be handled by the action right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By the action? We can't use the shared workflows to push to another repo.

# This workflow creates a GitHub release in iOS-SDK and attaches the built zip files.
# Run this AFTER the release PR has been 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

The upload-assets job only needs to upload zip files using gh CLI, which works fine on Ubuntu. This saves on macOS runner costs.
Change workflow to automatically run when release PRs are merged.

- Trigger on pull_request closed event instead of workflow_dispatch
- Only run if PR was merged and title contains 'Release'
- Support both main and version branches (e.g., 5.3-main)
- Use PR base branch for checkout instead of manual input
Copy link

@abdulraqeeb33 abdulraqeeb33 left a comment

Choose a reason for hiding this comment

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

lets try it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants