diff --git a/GitForWindowsHelper/finalize-g4w-release.js b/GitForWindowsHelper/finalize-g4w-release.js index d07a26f..354a7b5 100644 --- a/GitForWindowsHelper/finalize-g4w-release.js +++ b/GitForWindowsHelper/finalize-g4w-release.js @@ -58,5 +58,20 @@ module.exports = async (context, req) => { force: false // require fast-forward }) - return `Took care of pushing the \`main\` branch to close PR ${prNumber}` + // trigger "upload artifacts" workflow + const { handlePush } = require('./cascading-runs') + const uploadSnapshotAnswer = await handlePush(context, { + body: { + repository: { + owner: { + login: owner, + }, + name: repo, + }, + ref: 'refs/heads/main', + after: sha, + } + }) + + return `Took care of pushing the \`main\` branch to close PR ${prNumber}\n${uploadSnapshotAnswer}` } \ No newline at end of file diff --git a/__tests__/index.test.js b/__tests__/index.test.js index 710f73d..6fc9e44 100644 --- a/__tests__/index.test.js +++ b/__tests__/index.test.js @@ -943,11 +943,14 @@ test('a completed `release-git` run updates the `main` branch in git-for-windows try { expect(await index(context, context.req)).toBeUndefined() expect(context.res).toEqual({ - body: `Took care of pushing the \`main\` branch to close PR 765`, + body: [ + 'Took care of pushing the `main` branch to close PR 765', + `The 'tag-git' workflow run was started at dispatched-workflow-tag-git.yml`, + ].join('\n'), headers: undefined, status: undefined }) - expect(mockGitHubApiRequest).toHaveBeenCalledTimes(4) + expect(mockGitHubApiRequest).toHaveBeenCalledTimes(7) expect(mockGitHubApiRequest.mock.calls[3].slice(1)).toEqual([ 'installation-access-token', 'PATCH',