Skip to content

Commit 8fc77c5

Browse files
authored
Move bump downstreams to js-sdk specific release workflow (#4547)
Signed-off-by: Michael Telatynski <[email protected]>
1 parent 5bcd26e commit 8fc77c5

File tree

2 files changed

+35
-36
lines changed

2 files changed

+35
-36
lines changed

.github/workflows/release-make.yml

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ on:
2020
description: Publish to npm
2121
type: boolean
2222
default: false
23-
downstreams:
24-
description: List of github projects (owner/repo) which should have their dependency bumped to the newly released version (in JSON string array string syntax)
25-
type: string
26-
required: false
2723
gpg-fingerprint:
2824
description: Fingerprint of the GPG key to use for signing the git tag and assets, if any.
2925
type: string
@@ -38,6 +34,10 @@ on:
3834
description: The number of expected assets, including signatures, excluding generated zip & tarball.
3935
type: number
4036
required: false
37+
outputs:
38+
npm-id:
39+
description: "The npm package@version string we published"
40+
value: ${{ jobs.npm.outputs.id }}
4141
permissions: {}
4242
jobs:
4343
checks:
@@ -327,34 +327,3 @@ jobs:
327327
# wait-interval: 10
328328
# check-name: merge
329329
# allowed-conclusions: success
330-
331-
bump-downstreams:
332-
name: Update npm dependency in downstream projects
333-
needs: npm
334-
runs-on: ubuntu-24.04
335-
if: inputs.downstreams
336-
strategy:
337-
matrix:
338-
repo: ${{ fromJSON(inputs.downstreams) }}
339-
steps:
340-
- uses: actions/checkout@v4
341-
with:
342-
repository: ${{ matrix.repo }}
343-
ref: staging
344-
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
345-
346-
- uses: actions/setup-node@v4
347-
with:
348-
cache: "yarn"
349-
node-version: "lts/*"
350-
351-
- name: Bump dependency
352-
env:
353-
DEPENDENCY: ${{ needs.npm.outputs.id }}
354-
run: |
355-
git config --global user.email "[email protected]"
356-
git config --global user.name "RiotRobot"
357-
yarn upgrade "$DEPENDENCY" --exact
358-
git add package.json yarn.lock
359-
git commit -am"Upgrade dependency to $DEPENDENCY"
360-
git push origin staging

.github/workflows/release.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,37 @@ jobs:
3333
with:
3434
final: ${{ inputs.mode == 'final' }}
3535
npm: ${{ inputs.npm }}
36-
downstreams: '["element-hq/element-web"]'
36+
37+
bump-downstreams:
38+
name: Update npm dependency in downstream projects
39+
needs: release
40+
runs-on: ubuntu-24.04
41+
strategy:
42+
matrix:
43+
repo:
44+
- element-hq/element-web
45+
steps:
46+
- uses: actions/checkout@v4
47+
with:
48+
repository: ${{ matrix.repo }}
49+
ref: staging
50+
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
51+
52+
- uses: actions/setup-node@v4
53+
with:
54+
cache: "yarn"
55+
node-version: "lts/*"
56+
57+
- name: Bump dependency
58+
env:
59+
DEPENDENCY: ${{ needs.release.outputs.npm-id }}
60+
run: |
61+
git config --global user.email "[email protected]"
62+
git config --global user.name "RiotRobot"
63+
yarn upgrade "$DEPENDENCY" --exact
64+
git add package.json yarn.lock
65+
git commit -am"Upgrade dependency to $DEPENDENCY"
66+
git push origin staging
3767
3868
docs:
3969
name: Publish Documentation

0 commit comments

Comments
 (0)