Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use the commit hash from the readme publish #596

Merged
merged 11 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading