-
Notifications
You must be signed in to change notification settings - Fork 267
ci: Update release workflow #1600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
These methods are unused, leftover dead code.
fdb343a to
e1d53ad
Compare
3721793 to
1f7a8b5
Compare
* 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!
1f7a8b5 to
6d39e2f
Compare
| # Step 3: Upload the 10 xcframework zips to the release | ||
| upload-assets: | ||
| needs: [get-version, create-release] | ||
| runs-on: macos-13 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could run on merge of the release pr instead? e.g.
https://github.com/OneSignal/react-native-onesignal/blob/main/.github/workflows/cd.yml
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
abdulraqeeb33
left a comment
There was a problem hiding this 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
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)⏸️ Action Needed: Approve and merge PRs
2. Create GitHub Release in OneSignal-iOS-SDK (
create_github_release.yml)⏸️ Action Needed (optional): Here is chance to test releases before pushing out to package managers
3. Release SDK (
publish-release.yml)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
Checklist
Overview
Testing
Final pass
This change is