Skip to content

Commit

Permalink
fix: use the commit hash from the readme publish (#596)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon authored Sep 18, 2024
1 parent 0a3bfc4 commit 09d6fb4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/flow-deploy-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
needs: prepare-release
with:
commit-changes: true
version: ${{ needs.prepare-release.outputs.version }}
secrets:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
GH_ACCESS_GPG_KEY: ${{ secrets.GH_ACCESS_GPG_KEY }}
Expand All @@ -104,6 +105,7 @@ jobs:
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
fetch-depth: 0
ref: ${{ needs.update-readme.outputs.commit-hash }}

- name: Install GnuPG Tools
run: |
Expand Down Expand Up @@ -174,6 +176,7 @@ jobs:
- name: Publish Semantic Release
env:
commit: ${{ needs.update-readme.outputs.commit-hash }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER_NAME }}
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/flow-update-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ on:
type: boolean
required: false
default: false
version:
description: "The version to set the app to during deploy/release"
type: string
required: false
outputs:
commit-hash:
description: "The commit hash for the updated README.md commit"
value: ${{ jobs.commit-readme.outputs.commit_hash }}
push:
paths:
- '**/*.mjs'
Expand Down Expand Up @@ -100,9 +108,14 @@ jobs:
sudo apt-get install gettext-base
- name: Update README.md
env:
VERSION: ${{ github.event.inputs.version }}
run: |
set -x
npm install -g @hashgraph/solo
npm link
[[ -n "${VERSION}" ]] && npm version ${VERSION} -f --no-git-tag-version
which solo
export SOLO_CLUSTER_NAME=solo
Expand Down Expand Up @@ -178,7 +191,8 @@ jobs:
git_commit_gpgsign: true

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

0 comments on commit 09d6fb4

Please sign in to comment.