Skip to content

Conversation

@fadi-george
Copy link
Collaborator

@fadi-george fadi-george commented Oct 27, 2025

Description

One Line Summary

  • adds create release pr workflow

Details

  • removes release-drafter logic in favor a custom release workflow pr
  • custom create workflow file has 3 inputs (cordova version, android version (optional), ios version (optional))
    • gets merged prs for building out release notes
    • creates a release branch
      • if cordova version has alpha or beta in it, the release branch will be something like rel/5.3.0-alpha (no alpha/beta number)
      • otherwise release branch would look like rel/5.2.0
    • updates versions (package json, plugin.xml, etc.)
      • if ios version was updated, we update the examples pod lock file
      • runs bunx cap synx in examples folder
    • creates a pr to main (if stable) otherwise makes a pr to rel/ branch

Motivation

  • want to automate release process

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
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • 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.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@fadi-george fadi-george requested a review from jkasten2 October 27, 2025 18:28
@fadi-george fadi-george requested a review from nan-li October 27, 2025 20:45
@fadi-george fadi-george force-pushed the fg/release branch 3 times, most recently from dc11e39 to 33b22c2 Compare October 27, 2025 22:59
@fadi-george fadi-george force-pushed the fg/more-tests branch 4 times, most recently from 9d144c1 to 2bf66ce Compare October 28, 2025 19:05
Base automatically changed from fg/more-tests to main October 28, 2025 19:33
steps:
- uses: actions/checkout@v5

- uses: amannn/action-semantic-pull-request@v6

Choose a reason for hiding this comment

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

are we ok to use actions from third party libraries?

Choose a reason for hiding this comment

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

does github action have any standard action that we can use instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ive removed it.

owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed',
base: 'main',

Choose a reason for hiding this comment

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

what is if its a non release branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ive updated to check if cordova version is prerelease and use rel/ e.g. rel/5.3.0-beta (minus the beta number)

per_page: 100
});
// Filter and process PRs

Choose a reason for hiding this comment

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

i am thinking if we can standardize this across all PRs? that way we haev one way of doing it everywhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ive added a call to get prs merged into rel/

const hasFeatures = mergedPrs.some(pr => /^feat/i.test(pr.title));
core.setOutput('isFeature', hasFeatures);
- name: Calculate new version

Choose a reason for hiding this comment

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

why should we calculate new version? cant we just manually enter the version?
anything that i am missing here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, this isn't something we should have to re-invent. There are tools that exist for this purpose, which will cut down on our overhead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ive added a cordova-input instead of new version calculation. Though if we expect this to be called from android-sdk (in the future) wed need to programmatically determine the new version.

@fadi-george fadi-george force-pushed the fg/release branch 5 times, most recently from 43a536f to 73ea2b0 Compare October 29, 2025 17:59
RELEASE=$(curl -s -H "Authorization: token ${{ github.token }}" \
"https://api.github.com/repos/OneSignal/OneSignal-Android-SDK/releases/tags/v${VERSION}")
if echo "$RELEASE" | grep -q "\"id\""; then

Choose a reason for hiding this comment

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

is this a safe validation? have you tested it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will test when its merged

@fadi-george fadi-george changed the title ci: add create-release-pr workflow ci: add create-release-pr workflow action Oct 29, 2025
@fadi-george fadi-george changed the title ci: add create-release-pr workflow action ciz: add create-release-pr workflow action Oct 29, 2025
@fadi-george fadi-george changed the title ciz: add create-release-pr workflow action ci add create-release-pr workflow action Oct 29, 2025
@fadi-george fadi-george changed the title ci add create-release-pr workflow action ci: add create-release-pr workflow action Oct 29, 2025
@fadi-george fadi-george merged commit 35e921c into main Oct 29, 2025
4 of 5 checks passed
@fadi-george fadi-george deleted the fg/release branch October 29, 2025 19:01
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.

5 participants