-
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
| jobs: | ||
| # Step 1: Extract version from podspec | ||
| get-version: | ||
| runs-on: ubuntu-latest |
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.
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 |
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?
| runs-on: macos-13 | ||
|
|
||
| env: | ||
| VERSION: ${{ needs.get-version.outputs.version }} |
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.
do we need this token?
| # Push to remote | ||
| git push origin $RELEASE_BRANCH | ||
| env: | ||
| GH_TOKEN: ${{ secrets.PAT_TOKEN_ONESIGNAL_XCFRAMEWORK }} |
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.
why dont you do it once for the entire job?
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.
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 |
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.
💯
| 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
| @@ -0,0 +1,236 @@ | |||
| name: Create Release PRs | |||
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.
nit: file and name should be singular
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