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

feat: allow prerelease releases on Github #1181

Merged
merged 5 commits into from
Jan 11, 2022

Conversation

kalosisz
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1180 🦕

@kalosisz kalosisz requested a review from a team December 30, 2021 08:20
@kalosisz kalosisz requested a review from a team as a code owner December 30, 2021 08:20
@bcoe
Copy link
Contributor

bcoe commented Dec 30, 2021

Thank you for the PR @kalosisz 👏 might take a few days to review due to NY but excited for this.

Copy link
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

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

Thanks and this is looking great!

If I'm reading this right, it's not affecting the commits we consider since the last release. Are you intending to use this on a separate release branch? If not, when it comes time to release a stable version, it won't grab all the commits since the last stable version - it will grab since last release of any type on the release branch. (FWIW, we are probably going to be maintaining a preview branch in the near future which runs in parallel to the main branch and would probably use this --prerelease option).

src/manifest.ts Outdated Show resolved Hide resolved
src/manifest.ts Outdated Show resolved Hide resolved
@kalosisz
Copy link
Contributor Author

@chingor13 you are right. it would always consider the last release if it's not releaseing from a different branch.

I think it would be nice if one could specify to only consider stable releases (only storing those in the manifest.json or when looking for the latest release) as well. I could add such a feature if one's using the --prerelease option. I am a bit unsure of the builds though. Should they be considered stable?

src/github.ts Outdated Show resolved Hide resolved
src/github.ts Outdated Show resolved Hide resolved
allow prereleases on Github for versions with prerelease (eg beta)
for better marking non-production state of a release
they aren't used downstream.
Add spy testing the correct octokit call args.
remove passing prerelease for manifest options in cli and removing not needed tets
@kalosisz
Copy link
Contributor Author

hey @chingor13. I was thinking on having to generate the release notes on a prerelease from a stable. I reckon the library could have another flag for that for if one has a preview branch and only want to create release notes between prereleases, it
wouldn't be possible. I would leave this prerelese flag as it is now, to only create a Github prerelease.

What do you think?

@ChipWolf
Copy link

How would prerelease versioning work?

@kalosisz
Copy link
Contributor Author

kalosisz commented Jan 10, 2022

Versionings are managed in strategies and versioning-strategies. They might need to be extended.

Check out

this.versioningStrategy =
options.versioningStrategy || new DefaultVersioningStrategy({});

Copy link
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

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

I might be ok with having it always create the release as prerelease on GitHub. A repo maintainer may want to turn on that flag for pre-1.0.0 versions.

@kalosisz
Copy link
Contributor Author

@chingor13 So far I was looking only at the prerelease part, but based on your last comment, I added releasing pre-major as prereleaes in 6f3b7e5

I see my new commits didn't remove your approval? Is this intentional?

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.

Allow to release prerelease on Github
4 participants