MCPcopy
hub / github.com/softprops/action-gh-release / immutableReleaseAssetUploadMessage

Function immutableReleaseAssetUploadMessage

src/github.ts:296–302  ·  view source on GitHub ↗
(
  name: string,
  prerelease: boolean | undefined,
)

Source from the content-addressed store, hash-verified

294};
295
296const immutableReleaseAssetUploadMessage = (
297 name: string,
298 prerelease: boolean | undefined,
299): string =>
300 prerelease
301 ? `Cannot upload asset ${name} to an immutable release. GitHub only allows asset uploads before a release is published, but draft prereleases publish with the release.published event instead of release.prereleased. If you need prereleases with assets on an immutable-release repository, keep the release as a draft with draft: true, then publish it later from that draft and subscribe downstream workflows to release.published.`
302 : `Cannot upload asset ${name} to an immutable release. GitHub only allows asset uploads before a release is published, so upload assets to a draft release before you publish it.`;
303
304export const upload = async (
305 config: Config,

Callers 1

uploadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected