You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-07 23:02:56 +03:00
Add support for ingest-changes to refer to a project without package.json (#3864)
* 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>
This commit is contained in:
committed by
GitHub
parent
d179b8c557
commit
7de9b23e59
4
.github/workflows/release-action.yml
vendored
4
.github/workflows/release-action.yml
vendored
@@ -193,13 +193,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
retries: 3
|
retries: 3
|
||||||
script: |
|
script: |
|
||||||
const { RELEASE_ID: releaseId, DEPENDENCY } = process.env;
|
const { RELEASE_ID: releaseId, DEPENDENCY, VERSION } = process.env;
|
||||||
const { owner, repo } = context.repo;
|
const { owner, repo } = context.repo;
|
||||||
const script = require("./.action-repo/scripts/release/merge-release-notes.js");
|
const script = require("./.action-repo/scripts/release/merge-release-notes.js");
|
||||||
const notes = await script({
|
const notes = await script({
|
||||||
github,
|
github,
|
||||||
releaseId,
|
releaseId,
|
||||||
dependencies: [DEPENDENCY],
|
dependencies: [DEPENDENCY.replace("$VERSION", VERSION)],
|
||||||
});
|
});
|
||||||
core.exportVariable("RELEASE_NOTES", notes);
|
core.exportVariable("RELEASE_NOTES", notes);
|
||||||
|
|
||||||
|
@@ -3,9 +3,18 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
async function getRelease(github, dependency) {
|
async function getRelease(github, dependency) {
|
||||||
|
let owner;
|
||||||
|
let repo;
|
||||||
|
let tag;
|
||||||
|
if (dependency.includes("/") && dependency.includes("@")) {
|
||||||
|
owner = dependency.split("/")[0];
|
||||||
|
repo = dependency.split("/")[1].split("@")[0];
|
||||||
|
tag = dependency.split("@")[1];
|
||||||
|
} else {
|
||||||
const upstreamPackageJson = JSON.parse(fs.readFileSync(`./node_modules/${dependency}/package.json`, "utf8"));
|
const upstreamPackageJson = JSON.parse(fs.readFileSync(`./node_modules/${dependency}/package.json`, "utf8"));
|
||||||
const [owner, repo] = upstreamPackageJson.repository.url.split("/").slice(-2);
|
[owner, repo] = upstreamPackageJson.repository.url.split("/").slice(-2);
|
||||||
const tag = `v${upstreamPackageJson.version}`;
|
tag = `v${upstreamPackageJson.version}`;
|
||||||
|
}
|
||||||
|
|
||||||
const response = await github.rest.repos.getReleaseByTag({
|
const response = await github.rest.repos.getReleaseByTag({
|
||||||
owner,
|
owner,
|
||||||
|
Reference in New Issue
Block a user