Skip to content

Commit 14fff35

Browse files
committed
ci: wait for npm release and trigger the upgrade
Signed-off-by: jerensl <[email protected]>
1 parent 4fb353a commit 14fff35

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

.github/workflows/bump-meshery-version.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
name: Bump Meshery, Meshery Extensions and Meshery Cloud
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_run:
5+
workflows: [Publish Node.js Package]
6+
types:
7+
- completed
68

79
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@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
17+
with:
18+
name: e2e-test-reporter
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 ./version/number)" >> $GITHUB_OUTPUT
24+
id: current
825
bump-meshery:
926
runs-on: ubuntu-latest
1027
steps:
@@ -21,7 +38,7 @@ jobs:
2138
cache-dependency-path: '**/package-lock.json'
2239
- name: Make changes to pull request
2340
working-directory: ui
24-
run: npm install @layer5/sistent@latest
41+
run: npm install @layer5/sistent@${{job.status}}
2542
- name: Create Pull Request
2643
id: cpr
2744
uses: peter-evans/create-pull-request@v7

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,29 @@ jobs:
4444
npm publish --verbose
4545
env:
4646
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
versions-check:
48+
runs-on: ubuntu-latest
49+
outputs:
50+
current: ${{ steps.versions.outputs }}
51+
steps:
52+
- uses: actions/github-script@v7
53+
id: versions
54+
with:
55+
result-encoding: string
56+
script: |
57+
let str = "${{github.event.release.tag_name}}"
58+
59+
return str.replace(/^v/, '')
60+
- name: Save Release number
61+
if: ${{ !cancelled() }}
62+
run: |
63+
mkdir -p ./version
64+
echo ${{ steps.versions.outputs }} > ./version/number
65+
- name: Upload Version Report
66+
if: ${{ !cancelled() }}
67+
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
68+
with:
69+
name: version-number
70+
path: |
71+
version/number
72+
retention-days: 14

0 commit comments

Comments
 (0)