Skip to content

fix(scripts): write the release dist-tag to GITHUB_OUTPUT - #691

Open
ujjwalv01 wants to merge 1 commit into
accordproject:mainfrom
ujjwalv01:fix/tag-github-output
Open

ujjwalv01 wants to merge 1 commit into
accordproject:mainfrom
ujjwalv01:fix/tag-github-output

Conversation

@ujjwalv01

Copy link
Copy Markdown
Contributor

Follow-up to accordproject/concerto-codegen#288

scripts/tag.js picks the npm dist-tag for a release (latest, or unstable for a pre-release) and hands it to publish.yml with the ::set-output workflow command, which GitHub has deprecated: every release logs "The set-output command is deprecated and will be disabled soon". Once it is disabled, steps.tag.outputs.tag is empty, npm publish falls back to npm's default tag, and a pre-release would be published as latest.

This ports the fix already merged in accordproject/concerto#1324 and accordproject/concerto-codegen#297.

Changes

  • scripts/tag.js appends tag=--tag=<tag> to the file named by GITHUB_OUTPUT, so steps.tag.outputs.tag in publish.yml gets the same value as before.
  • Outside GitHub Actions (no GITHUB_OUTPUT), it prints --tag=<tag>, for running it by hand.

Flags

  • None. publish.yml is unchanged and reads the same output.

Screenshots or Video

N/A

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:fix/tag-github-output

Testing: with GITHUB_OUTPUT set, node scripts/tag.js 2.0.0 writes tag=--tag=latest and 2.1.0-beta.1 writes tag=--tag=unstable; without it, the script prints --tag=latest / --tag=unstable; an invalid version still exits with code 1.

scripts/tag.js used the deprecated ::set-output workflow command. Once GitHub disables it, steps.tag.outputs.tag is empty and a pre-release would be published as latest. Port the fix from accordproject/concerto#1324 and accordproject/concerto-codegen#297.

Signed-off-by: Ujjwal Verma <ujjwalverma010305@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant