Skip to content

Automated releases - #2949

Merged
acywatson merged 14 commits into
mainfrom
automated-releases
Sep 8, 2022
Merged

acywatson merged 14 commits into
mainfrom
automated-releases

Conversation

@acywatson

@acywatson acywatson commented Sep 6, 2022 •

Copy link
Copy Markdown
Contributor

This will initially let us manually kick off end-to-end automated releases. Later, we can adjust the config easily to add support for nightly prerelease runs, or even release on every commit (to a different channel) if we want.

What this actually does now:

Creates a new manually-initiated workflow that creates a new branch, bumps the version across all packages, commits the changes, and pushes the branch to the remote. From there, someone needs to create a PR for it.

Creates a second automated workflow that runs when a commit is pushed to the "next" or "latest" branch. This won't actually release right now because I commented that step out, but once enabled, this would publish all packages to the npm release channel associated with the destination branch ('next' for prerelease and 'latest' as the default for stable releases).

Todo:

  • Fix version script to add all package.json before committing - can probably change this to just run npm version on the workspace root, then run the updateVersion script like before to get the rest. Then, we can just do the git commit and git tag with shell commands.
  • Rewrite changelog to auto-generate for fully automated builds.
  • Possibly update version in LexicalVersion.ts in postversion step.
  • The manual workflow should create a PR automatically.

@vercel

vercel Bot commented Sep 6, 2022 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Sep 7, 2022 at 4:17PM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Sep 7, 2022 at 4:17PM (UTC)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 6, 2022
@acywatson
acywatson marked this pull request as ready for review September 7, 2022 16:05
Comment thread scripts/updateVersion.js
fs.writeJsonSync(`./package.json`, basePackageJSON, {
spaces: 2,
});
const version = basePackageJSON.version;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't we just import the VERSION constant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

One thing we want to do is here is get away from using a constant to keep track of the version. I actually want to delete that file entirely, but I think @zurfyx was using it in @lexicla/file - we probably could use a different solution there.

For now, we'll probably programmatically update the version constant as part of this script. The benefit of using npm version instead is that it automatically calculates the next semantic version for a given increment type - less chance for mistakes.

@acywatson
acywatson merged commit e829a84 into main Sep 8, 2022
acywatson added a commit that referenced this pull request Sep 13, 2022
* fix (#2956)

* Add table cell menu back (#2958)

* fix (#2957)

* fix typo on read-mode / edit-mode page (#2962)

Co-authored-by: Christian Ratz <[email protected]>

* Fix link breaking when formatting on (#2954)

* Fix link breaking when formatting on

* nodeFormat to const

* retry checks

* allow escaped markdown within TextFormatTransformer (#2964)

Co-authored-by: Christian Ratz <[email protected]>

* Fix bugs with isEditable (#2967)

* Fix bugs with isEditable

* Revise

* Add empty comment in front of 'export' in a bundled file (#2970)

* Automated releases (#2949)

* change to using package.json in root as pinned version

* wip automated release workflow with manual triggerl

* change release script

* Fix build script

* checkout new branch

* release on push to next

* no accidental releases

* release on push to latest

* fix yaml

* fix yaml

* fix yaml

* remove unnecessary

* remove unnecessary

* prettier

* Update collab errors, related cleanup (#2971)

* install (#2972)

* Improve docs around the React plugins page (#2976)

* Improve docs around the React plugins page

* Improve docs around the React plugins page

* config (#2977)

* Clean up redundant newlines during pasting (#2969)

* Cleanup newlines unless its preformatted element

* Update docs

* push config (#2979)

* add ssh key

* add back config

* merge from main

* merge from main

* fix versioning for ff merge (#2983)

* remove ff merge from release (#2984)

* Fixed exportDOM for paragraph node (#2981)

* export DOM for paragraph node

* Fixed export DOM for paragraph node

* docs: Fix URL of rich-text and plain-text (#2985)

* docs: loadContent clarification (#2989)

* Fix insert column header bug (#2995)

* Fix WWW import rewrite for React (#2996)

* bad toc types

* fix react rename

* Fix www exports (#2994)

* [Automated Releases] Add logging and dry run to release script (#2986)

* add logs to release script

* add dry run to release script

* adjust dry run script

* add tag

* dont paginate changelog output

* auto-update changelog

* fix changelog

* fix import

* async

* cleanup

* fix

* fix

* Add DEPRECATED prefix to Grid APIs (#2966)

* Rm unused helpers from older markdown code (#2998)

* ElementNode -> isTopLevel() (#3001)

* Capture pendingDecorators after garbage collecting detached decorators (#2999)

* v0.4.2-next.0

Co-authored-by: Tyler Bainbridge <[email protected]>
Co-authored-by: Christian Ratz <[email protected]>
Co-authored-by: Christian Ratz <[email protected]>
Co-authored-by: Patrick McCullough <[email protected]>
Co-authored-by: Dominic Gannaway <[email protected]>
Co-authored-by: Maksim Horbachevsky <[email protected]>
Co-authored-by: Hafiz <[email protected]>
Co-authored-by: kimulaco <[email protected]>
Co-authored-by: ly3xqhl8g9 <[email protected]>
Co-authored-by: Gerard Rovira <[email protected]>
Co-authored-by: Adrien Wald <[email protected]>
Co-authored-by: Lexical GitHub Actions Bot <>
@zurfyx zurfyx mentioned this pull request Sep 23, 2022
acywatson added a commit that referenced this pull request Oct 18, 2022
* change to using package.json in root as pinned version

* wip automated release workflow with manual triggerl

* change release script

* Fix build script

* checkout new branch

* release on push to next

* no accidental releases

* release on push to latest

* fix yaml

* fix yaml

* fix yaml

* remove unnecessary

* remove unnecessary

* prettier
thegreatercurve pushed a commit that referenced this pull request Nov 25, 2022
* change to using package.json in root as pinned version

* wip automated release workflow with manual triggerl

* change release script

* Fix build script

* checkout new branch

* release on push to next

* no accidental releases

* release on push to latest

* fix yaml

* fix yaml

* fix yaml

* remove unnecessary

* remove unnecessary

* prettier
@trueadm
trueadm deleted the automated-releases branch December 18, 2022 00:56

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 4a86bc00 Deployed Sep 7, 2022 by vercel[bot]
Preview – lexical — 4a86bc00 Deployed Sep 7, 2022 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants