Skip to content

Commit

Permalink
Output release version to caller workflow
Browse files Browse the repository at this point in the history
Some projects output both Scala and NPM libraries with a single
release - for example, we need to support this in content-api-models:

guardian/content-api-models#232

...rather than try to teach gha-scala-library-release-workflow how to
do NPM releases, it seems better to let the workflow do the Scala
release, and then output the release version number so that it
can be used by a subsequent custom 'npm release' stage of caller
workflow.

See also: https://docs.github.com/en/actions/using-workflows/reusing-workflows#using-outputs-from-a-reusable-workflow
  • Loading branch information
rtyley committed Jan 19, 2024
1 parent 58cfc06 commit 4f043e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/reusable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
Should be in normal plaintext 'BEGIN PGP PUBLIC KEY BLOCK' (ASCII-armored) format, with no additional BASE64-encoding.
The passphrase can be removed from an existing key using 'gpg --edit-key <key-id> passwd' : https://unix.stackexchange.com/a/550538/46453"
required: true
outputs:
RELEASE_VERSION:
description: "The un-prefixed version number of the release, eg '3.0.1'"
value: ${{ jobs.push-release-commit.outputs.release_version }}

env:
LOCAL_ARTIFACTS_STAGING_PATH: /tmp/artifact_staging
Expand Down

0 comments on commit 4f043e1

Please sign in to comment.