Skip to content

Commit b4b290c

Browse files
committed
chore: update release workflow and add notify dependents job
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
1 parent dd3cbbf commit b4b290c

2 files changed

Lines changed: 74 additions & 89 deletions

File tree

.github/workflows/bump-meshery-version.yml renamed to .github/workflows/notify-dependents.yml

Lines changed: 62 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
11
name: Bump Meshery, Meshery Extensions and Meshery Cloud
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
release-version:
7+
description: "Release Version"
8+
required: true
9+
default: "1.0.0"
10+
type: string
411
workflow_run:
512
workflows: [Publish Node.js Package]
613
types:
714
- completed
815

916
jobs:
10-
versions-check:
11-
runs-on: ubuntu-latest
12-
outputs:
13-
current: ${{ steps.current.outputs.VERSION }}
14-
steps:
15-
- name: Download Version
16-
uses: actions/download-artifact@v7
17-
with:
18-
name: version-number
19-
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
20-
run-id: ${{ github.event.workflow_run.id }}
21-
- name: Retrieve Version
22-
run: |
23-
echo "VERSION=$(cat ./number)" >> $GITHUB_OUTPUT
24-
id: current
2517
bump-meshery:
26-
runs-on: ubuntu-latest
27-
needs: versions-check
18+
runs-on: ubuntu-24.04
19+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.output.release-version }}
2820
steps:
2921
- name: Checkout Meshery code
3022
uses: actions/checkout@v6
@@ -39,31 +31,32 @@ jobs:
3931
cache-dependency-path: '**/package-lock.json'
4032
- name: Make changes to pull request
4133
working-directory: ui
42-
run: npm install @sistent/sistent@${{needs.versions-check.outputs.current}}
34+
run: npm install @sistent/sistent@${{ github.event.workflow_run.output.release-version }}
4335
- name: Create Pull Request
4436
id: cpr
4537
uses: peter-evans/create-pull-request@v8
4638
with:
4739
token: ${{ secrets.GH_ACCESS_TOKEN }}
48-
commit-message: Update to Sistent v${{ needs.versions-check.outputs.current }} dependencies
40+
commit-message: Update to Sistent v${{ github.event.workflow_run.output.release-version }} dependencies
4941
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
5042
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
5143
signoff: true
5244
branch: bump-sistent-bot
5345
delete-branch: true
54-
title: '[Chore]: Update to Sistent v${{ needs.versions-check.outputs.current }}'
46+
title: '[Chore]: Update to Sistent v${{ github.event.workflow_run.output.release-version }}'
5547
add-paths: |
5648
ui/package.json
5749
ui/package-lock.json
5850
body: |
59-
Update to Sistent v${{ needs.versions-check.outputs.current }}
51+
Update to Sistent v${{ github.event.workflow_run.output.release-version }}
6052
6153
_This pull request has been auto-generated by [l5io](http://github.com/l5io)_
6254
assignees: l5io
6355
draft: false
56+
6457
bump-meshery-extensions:
6558
runs-on: ubuntu-latest
66-
needs: versions-check
59+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.output.release-version }}
6760
steps:
6861
- name: Checkout Meshery Extensions code
6962
uses: actions/checkout@v6
@@ -78,13 +71,13 @@ jobs:
7871
cache-dependency-path: '**/package-lock.json'
7972
- name: Make changes to pull request
8073
working-directory: meshmap
81-
run: npm install @sistent/sistent@${{needs.versions-check.outputs.current}}
74+
run: npm install @sistent/sistent@${{ github.event.workflow_run.output.release-version }}
8275
- name: Create Pull Request
8376
id: cpr
8477
uses: peter-evans/create-pull-request@v8
8578
with:
8679
token: ${{ secrets.GH_ACCESS_TOKEN }}
87-
commit-message: Update to Sistent v${{ needs.versions-check.outputs.current }} dependencies
80+
commit-message: Update to Sistent v${{ github.event.workflow_run.output.release-version }} dependencies
8881
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
8982
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
9083
signoff: true
@@ -95,52 +88,55 @@ jobs:
9588
meshmap/package.json
9689
meshmap/package-lock.json
9790
body: |
98-
Update to Sistent v${{ needs.versions-check.outputs.current }}
91+
Update to Sistent v${{ github.event.workflow_run.output.release-version }}
9992
10093
_This pull request has been auto-generated by [l5io](http://github.com/l5io)_
10194
assignees: l5io
10295
draft: false
96+
10397
bump-layer5:
104-
runs-on: ubuntu-latest
105-
needs: versions-check
106-
steps:
107-
- name: Checkout Layer5 code
108-
uses: actions/checkout@v6
109-
with:
110-
repository: layer5io/layer5
111-
fetch-depth: 1
112-
token: ${{ secrets.GH_ACCESS_TOKEN }}
113-
- uses: actions/setup-node@v6
114-
with:
115-
node-version: '20.x'
116-
cache: "npm"
117-
cache-dependency-path: '**/package-lock.json'
118-
- name: Make changes to pull request
119-
run: npm install @sistent/sistent@${{needs.versions-check.outputs.current}} --legacy-peer-deps
120-
- name: Create Pull Request
121-
id: cpr
122-
uses: peter-evans/create-pull-request@v8
123-
with:
124-
token: ${{ secrets.GH_ACCESS_TOKEN }}
125-
commit-message: Bump sistent v${{ needs.versions-check.outputs.current }} dependencies
126-
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
127-
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
128-
signoff: true
129-
branch: bump-sistent-bot
130-
delete-branch: true
131-
title: '[Chore]: Update to Sistent v${{ needs.versions-check.outputs.current }}'
132-
add-paths: |
133-
package.json
134-
package-lock.json
135-
body: |
136-
Update to Sistent v${{ needs.versions-check.outputs.current }}
98+
runs-on: ubuntu-latest
99+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.output.release-version }}
100+
101+
steps:
102+
- name: Checkout Layer5 code
103+
uses: actions/checkout@v6
104+
with:
105+
repository: layer5io/layer5
106+
fetch-depth: 1
107+
token: ${{ secrets.GH_ACCESS_TOKEN }}
108+
- uses: actions/setup-node@v6
109+
with:
110+
node-version: '20.x'
111+
cache: "npm"
112+
cache-dependency-path: '**/package-lock.json'
113+
- name: Make changes to pull request
114+
run: npm install @sistent/sistent@${{ github.event.workflow_run.output.release-version }} --legacy-peer-deps
115+
- name: Create Pull Request
116+
id: cpr
117+
uses: peter-evans/create-pull-request@v8
118+
with:
119+
token: ${{ secrets.GH_ACCESS_TOKEN }}
120+
commit-message: Bump sistent v${{ github.event.workflow_run.output.release-version }} dependencies
121+
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
122+
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
123+
signoff: true
124+
branch: bump-sistent-bot
125+
delete-branch: true
126+
title: '[Chore]: Update to Sistent v${{ github.event.workflow_run.output.release-version }}'
127+
add-paths: |
128+
package.json
129+
package-lock.json
130+
body: |
131+
Update to Sistent v${{ github.event.workflow_run.output.release-version }}
132+
133+
_This pull request has been auto-generated by [l5io](http://github.com/l5io)_
134+
assignees: l5io
135+
draft: false
137136

138-
_This pull request has been auto-generated by [l5io](http://github.com/l5io)_
139-
assignees: l5io
140-
draft: false
141137
bump-meshery-cloud:
142138
runs-on: ubuntu-latest
143-
needs: versions-check
139+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.output.release-version }}
144140
steps:
145141
- name: Checkout Meshery Extensions code
146142
uses: actions/checkout@v6
@@ -155,24 +151,24 @@ jobs:
155151
cache-dependency-path: '**/package-lock.json'
156152
- name: Make changes to pull request
157153
working-directory: ui
158-
run: npm install @sistent/sistent@${{needs.versions-check.outputs.current}}
154+
run: npm install @sistent/sistent@${{ github.event.workflow_run.output.release-version }}
159155
- name: Create Pull Request
160156
id: cpr
161157
uses: peter-evans/create-pull-request@v8
162158
with:
163159
token: ${{ secrets.GH_ACCESS_TOKEN }}
164-
commit-message: Update to Sistent v${{ needs.versions-check.outputs.current }} dependencies
160+
commit-message: Update to Sistent v${{ github.event.workflow_run.output.release-version }} dependencies
165161
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
166162
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
167163
signoff: true
168164
branch: bump-sistent-bot
169165
delete-branch: true
170-
title: '[Chore]: Update to Sistent v${{ needs.versions-check.outputs.current }}'
166+
title: '[Chore]: Update to Sistent v${{ github.event.workflow_run.output.release-version }}'
171167
add-paths: |
172168
ui/package.json
173169
ui/package-lock.json
174170
body: |
175-
Update to Sistent v${{ needs.versions-check.outputs.current }}
171+
Update to Sistent v${{ github.event.workflow_run.output.release-version }}
176172
177173
_This pull request has been auto-generated by [l5io](http://github.com/l5io)_
178174
assignees: l5io

.github/workflows/release.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
name: Publish NPM Package
1+
name: Publish Node.js Package
22

33
on:
44
release:
55
types: [published]
66

77
workflow_dispatch:
88
inputs:
9-
release_version:
9+
tag_name:
1010
description: "Release Version"
1111
required: true
1212
default: "v1.0.0"
1313
type: string
14+
1415
env:
1516
HUSKY: 0
1617

@@ -21,7 +22,7 @@ permissions:
2122
jobs:
2223
publish:
2324
runs-on: ubuntu-24.04
24-
25+
2526
permissions:
2627
id-token: write # Required for OIDC trusted publishing
2728
contents: write
@@ -48,29 +49,17 @@ jobs:
4849
npm publish --provenance --access public --verbose
4950
env:
5051
NODE_AUTH_TOKEN: '' # Explicitly empty for install
51-
52-
versions-check:
52+
53+
notify-dependents:
5354
needs: publish
54-
runs-on: ubuntu-latest
55+
runs-on: ubuntu-24.04
56+
outputs:
57+
release-version: ${{ steps.stripped-release-version.outputs.result }}
5558
steps:
5659
- uses: actions/github-script@v7
57-
id: versions
60+
id: stripped-release-version
5861
with:
5962
result-encoding: strings
6063
script: |
61-
let str = `${{github.event.release.tag_name}}`
62-
63-
return str.replace(/^v/, '')
64-
- name: Save Release number
65-
if: ${{ !cancelled() }}
66-
run: |
67-
mkdir -p ./version
68-
echo ${{ steps.versions.outputs.result }} > ./version/number
69-
- name: Upload Version Report
70-
if: ${{ !cancelled() }}
71-
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
72-
with:
73-
name: version-number
74-
path: |
75-
version/number
76-
retention-days: 14
64+
let release-version = `${{github.event.release.tag_name}}`
65+
return release-version.replace(/^v/, '')

0 commit comments

Comments
 (0)