From 79d399a9e2c8e7a32ebc1a9e3068926d9b0ec994 Mon Sep 17 00:00:00 2001 From: Tatsinnit Date: Fri, 22 Mar 2024 20:50:28 +1300 Subject: [PATCH] Update publish.yml --- .github/workflows/publish.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8f09f622..ad7a4bef 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,6 +8,9 @@ jobs: JobBuild: name: release runs-on: ubuntu-latest + # Expose step outputs as job outputs + outputs: + currentversion: ${{ steps.package_version.outputs.current-version }} permissions: actions: read contents: read @@ -34,13 +37,7 @@ jobs: - name: Get current package version id: package_version uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1 - - name: Check version is mentioned in Changelog - id: changelog_reader - uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3 - with: - validation_depth: 10 - version: ${{ steps.package_version.outputs.current-version }} - path: 'CHANGELOG.md' + JobsPublish: name: publish runs-on: ubuntu-latest @@ -51,12 +48,19 @@ jobs: deployments: read packages: none steps: + - name: Check version is mentioned in Changelog + id: changelog_reader + uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3 + with: + validation_depth: 10 + version: ${{ needs.JobBuild.outputs.currentversion }} + path: 'CHANGELOG.md' - name: Create a Release id: create_release uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name : ${{ needs.JobBuild.outputs.current-version }} - release_name: ${{ needs.JobBuild.outputs.current-version}} + tag_name : ${{ needs.JobBuild.outputs.currentversion }} + release_name: ${{ needs.JobBuild.outputs.currentversion}} body: Publish ${{ steps.changelog_reader.outputs.changes }}