Skip to content

Fix to release scripts when called in other repos#65

Merged
jskupsik merged 3 commits into
developfrom
fixReleaseScriptsForOtherProjects
Apr 7, 2026
Merged

Fix to release scripts when called in other repos#65
jskupsik merged 3 commits into
developfrom
fixReleaseScriptsForOtherProjects

Conversation

@jskupsik
Copy link
Copy Markdown
Contributor

@jskupsik jskupsik commented Apr 7, 2026

Replaced $GITHUB_WORKSPACE paths with $GITHUB_ACTION_PATH so actions work when used in other repos.

This bug broke the release scripts when called from other repos; it just so happened that only the release scripts used the GITHUB_WORKSPACE variable, the snapshot scripts did not.

Fix to the error encountered here when trying to release hoist-react using the new code:

Run xh/hoist-dev-utils/.github/actions/validate-release-version@master
Run bash "$GITHUB_WORKSPACE/.github/scripts/validate-release-version.sh"
bash: /home/runner/work/hoist-react/hoist-react/.github/scripts/validate-release-version.sh: No such file or directory
Error: Process completed with exit code 127.

Using the GITHUB_WORKSPACE address accessed the local directory in hosit-react, which lacks the scripts present in hoist-dev-utils. This to have an easy remedy - use the GITHUB_ACTION_PATH instead.

According to https://docs.github.com/en/actions/reference/workflows-and-actions/variables

$GITHUB_WORKSPACE is "The default working directory on the runner for steps, and the default location of your repository when using the checkout action."

$GITHUB_ACTION_PATH is "The path where an action is located. This property is only supported in composite actions. You can use this path to change directories to where the action is located and access other files in that same repository. For example, /home/runner/work/_actions/repo-owner/name-of-action-repo/v1."

These two actions are already "composite" actions for this very reason, it appears we were simply using the wrong variable in these two spots.

@jskupsik jskupsik merged commit f5abf7f into develop Apr 7, 2026
1 check passed
@jskupsik jskupsik deleted the fixReleaseScriptsForOtherProjects branch April 7, 2026 23:16
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.

2 participants