diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d898a2..695cf28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,6 +92,8 @@ jobs: changelog: name: Generate new changelog runs-on: ubuntu-latest + outputs: + commit_hash: '${{ steps.committing.outputs.commit_hash }}' steps: - name: Checkout uses: actions/checkout@v4 @@ -154,6 +156,7 @@ jobs: name: changelog path: CHANGELOG.md - name: Commit and push the new changelog + id: committing run: | if [ -z $(git status -uno --porcelain) ]; then printf 'Changelogs are identical, nothing to commit\n' @@ -164,6 +167,9 @@ jobs: git add CHANGELOG.md git commit -am "Update the project changelog" + + commit_hash=$( git --no-pager log -1 --format=%H ) + echo "commit_hash=${commit_hash}" >> "$GITHUB_OUTPUT" fi - name: Push changes uses: ad-m/github-push-action@v0.8.0 @@ -181,6 +187,7 @@ jobs: uses: actions/checkout@v4 with: set-safe-directory: 'true' + ref: '${{ needs.changelog.outputs.commit_hash }}' - name: Install dependencies run: npm ci --ignore-scripts - name: Maybe generate tag diff --git a/package.json b/package.json index 1f26423..15ac429 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "async-wait-until", - "version": "2.0.24", + "version": "2.0.25", "description": "Waits until the given predicate function returns a truthy value, then resolves", "main": "./dist/index.js", "module": "./dist/index.esm.js",