Skip to content
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

Adding actions for generating and publishing a release #139

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

theRealRobG
Copy link
Collaborator

Description

Provides new actions to help with generating and publishing releases.

The generate-release action is a manual dispatch action that takes the version number as an input, and depending on the major version, will checkout either main or main_1.x, then merge either develop or develop_1.x into it, bump all the version strings in the repo, and raise a PR against main or main_1.x.

The publish-release action runs on merge to main or main_1.x and reads the version from the version.txt file to determine the release tag it should publish, then publishes that release.

NOTE: both of these actions are broken in v2 of the repo until we bring it up to date with the Swift Package Manager support changes, as the version.txt file does not exist in develop currently.

I validated all the behavior in a test repo here: https://github.com/theRealRobG/TestManualAction

Here is a screenshot of how the Action looks like once it is merged to the "Default" branch (has to be made available in the Default branch for it to appear):
Screenshot 2024-10-02 at 23 43 17

First you would select the Action name and then select the "Run workflow" dropdown tab to parameterize the release (pick v1 or v2, and then input minor and patch versions).

Change Notes

  • Added generate-release action that creates a PR from main, merges develop into it, and bumps the version to the desired value.
  • Added publish-release action that creates a new release after a merge to main or main_1.x

Pre-submission Checklist

  • I ran the unit tests locally before checking in.
  • I made sure there were no compiler warnings before checking in.
  • I have written useful documentation for all public code.
  • I have written unit tests for this new feature.

The generate-release action is a manual dispatch action that takes
the version number as an input, and depending on the major version,
will checkout either main or main_1.x, then merge either develop or
develop_1.x into it, bump all the version strings in the repo, and
raise a PR against main or main_1.x.

The publish-release action runs on merge to main or main_1.x and
reads the version from the version.txt file to determine the
release tag it should publish, then publishes that release.

NOTE: both of these actions are broken in v2 of the repo until we
bring it up to date with the Swift Package Manager support changes,
as the version.txt file does not exist in develop currently.
@theRealRobG theRealRobG requested a review from rmigneco October 3, 2024 04:26
@theRealRobG theRealRobG self-assigned this Oct 3, 2024
workflow_dispatch:
inputs:
major:
description: 'Major version'
Copy link
Collaborator

Choose a reason for hiding this comment

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

really nice

@theRealRobG theRealRobG merged commit 29be3e0 into develop_1.x Oct 9, 2024
4 checks passed
@theRealRobG theRealRobG deleted the adding-release-actions branch October 9, 2024 03:10
@rmigneco rmigneco restored the adding-release-actions branch November 13, 2024 14:56
@rmigneco rmigneco deleted the adding-release-actions branch November 13, 2024 14:59
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.

2 participants