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
jobs:
# Step 1: Extract version from podspec
get-version:
runs-on: ubuntu-latest

Choose a reason for hiding this comment

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

does it work on Ubuntu?

# 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?

runs-on: macos-13

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

Choose a reason for hiding this comment

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

do we need this token?

# Push to remote
git push origin $RELEASE_BRANCH
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN_ONESIGNAL_XCFRAMEWORK }}

Choose a reason for hiding this comment

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

why dont you do it once for the entire job?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have to push to another repository https://github.com/OneSignal/OneSignal-XCFramework, and I need a different PAT token.

# Step 3: Use reusable workflow to create iOS SDK PR with release notes
create-ios-pr:
needs: [prep, update-and-build]
uses: OneSignal/sdk-actions/.github/workflows/create-release.yml@main

Choose a reason for hiding this comment

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

💯

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.

@@ -0,0 +1,236 @@
name: Create Release PRs
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: file and name should be singular

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