* Remove redundant `pre-release.sh` script
This is now a no-op (there are no `matrix_lib` fields in package.json), so we
may as well remove it.
* Remove redundant `post-merge-master` script
Just as pre-release is a no-op, so is this
* Remove redundant switch_package_to_release script
Once more: this script is a no-op.
* Rename `switch_package_to_release.js` to `.cjs`
Slightly surprisingly, the symlink is enough to make `node
switch_package_to_release.js` work.
* Rename .eslintrc.js to .cjs
Again, declare this as commonjs
* Move `type:module` declaration into package.json.
matrix-js-sdk is built into ECMAScript modules, and we should declare it as
such. See https://nodejs.org/api/packages.html#type. Failure to do so causes
problems for javascript projects attempting to build against matrix-js-sdk: see https://github.com/matrix-org/matrix-js-sdk/issues/4347.
Previously, we did this as part of the package.json switcheroo, but that is
unnecessarily fragile.
matrix-react-sdk, element-web, etc are unaffected by this, because they use the
typescript files directly, by importing `matrix-js-sdk/src/...`.
* Reapply "Add "type" = "module" to ensure it is present (#4350)" (#4352)
This reverts commit 8214fd7156b2a8525a977e22bc400dcdb7aec7b1.
* Mark prettier config file as CommonJS
I *think* this will fix a problem with the release process in which we saw an
error:
```
Error: Invalid configuration for file "/home/runner/work/matrix-js-sdk/matrix-js-sdk/package.json":
Error: module is not defined in ES module scope
Error: This file is being treated as an ES module because it has a '.js' file extension and '/home/runner/work/matrix-js-sdk/matrix-js-sdk/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
```
* Declare matrix-js-sdk as an ES module
* Rename `babel.config.js` to show it is a CommonJS module
... otherwise it gets broken by `scripts/switch_package_to_release.js`
* Fix ingest of release notes wiping out the parent notes
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove redundant reusable workflow input
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* When merging release notes, allow considering later versions in the same major.minor.patch set
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak comments
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tidy reusable release workflow
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add ability to include upstream changes
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add ability to upload assets and gpg sign them
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update relative composite actions
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Wire up validating release tarball signature
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Validate release has expected assets
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Paths
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use gpg outputs for email instead of scraping it ourselves
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* v6
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Extract pre-release and post-merge-master scripts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Reuse pre-release and post-merge-master scripts in gha
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Cull unused vars
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Revert
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove unused variables
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify and fix merge-release-notes script
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tidy release automation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update release.sh
* Move environment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* s/includes/contains/
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate uses syntax
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix action-repo calls
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix RELEASE_NOTES env
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix if check
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix gpg tag signing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Cull stale params
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix sign-release-tarball paths being outside the workspace
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix gpg validation (of course wget uses `-O` and not `-o`)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix expected asset assertion
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix release publish mode
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add support for ingest-changes to refer to a project without it being in node_modules
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Fixes https://github.com/vector-im/element-web/issues/14947
Much like element-web's Jitsi wrapper build steps, this downloads the emoji JSON at build time to ensure it gets reasonably updated. In the future, the spec might want to consider publishing a dedicated i18n package on npm for this, however this is fine for now. We download rather than copy/paste to ensure we always have an updated copy.