Skip to content

Commit 09d6fb4

Browse files
fix: use the commit hash from the readme publish (#596)
Signed-off-by: Jeromy Cannon <[email protected]>
1 parent 0a3bfc4 commit 09d6fb4

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/flow-deploy-release-artifact.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
needs: prepare-release
8888
with:
8989
commit-changes: true
90+
version: ${{ needs.prepare-release.outputs.version }}
9091
secrets:
9192
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
9293
GH_ACCESS_GPG_KEY: ${{ secrets.GH_ACCESS_GPG_KEY }}
@@ -104,6 +105,7 @@ jobs:
104105
with:
105106
token: ${{ secrets.GH_ACCESS_TOKEN }}
106107
fetch-depth: 0
108+
ref: ${{ needs.update-readme.outputs.commit-hash }}
107109

108110
- name: Install GnuPG Tools
109111
run: |
@@ -174,6 +176,7 @@ jobs:
174176
175177
- name: Publish Semantic Release
176178
env:
179+
commit: ${{ needs.update-readme.outputs.commit-hash }}
177180
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
178181
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
179182
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER_NAME }}

.github/workflows/flow-update-readme.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ on:
3333
type: boolean
3434
required: false
3535
default: false
36+
version:
37+
description: "The version to set the app to during deploy/release"
38+
type: string
39+
required: false
40+
outputs:
41+
commit-hash:
42+
description: "The commit hash for the updated README.md commit"
43+
value: ${{ jobs.commit-readme.outputs.commit_hash }}
3644
push:
3745
paths:
3846
- '**/*.mjs'
@@ -100,9 +108,14 @@ jobs:
100108
sudo apt-get install gettext-base
101109
102110
- name: Update README.md
111+
env:
112+
VERSION: ${{ github.event.inputs.version }}
103113
run: |
104114
set -x
105115
npm install -g @hashgraph/solo
116+
npm link
117+
118+
[[ -n "${VERSION}" ]] && npm version ${VERSION} -f --no-git-tag-version
106119
which solo
107120
108121
export SOLO_CLUSTER_NAME=solo
@@ -178,7 +191,8 @@ jobs:
178191
git_commit_gpgsign: true
179192

180193
- name: Commit README.md Changes
181-
if : ${{ inputs.commit-changes }}
194+
id: commit-readme
195+
if : ${{ github.event.inputs.dry-run-enabled != 'true' && !cancelled() && !failure() && inputs.commit-changes }}
182196
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
183197
with:
184198
commit_message: "auto update README.md [skip ci]"

0 commit comments

Comments
 (0)