Skip to content

Commit

Permalink
update shell pkg workflow to release the remaining pkgs that are usua…
Browse files Browse the repository at this point in the history
…lly published in tandem with shell on npm (rancher#10185)

* update shell pkg workflow to release the remaining pkgs that are usually published in tandem with shell on npm

* change workflow trigger just for testing

* updates

* PR cleanup after proving workflow

* update arg

---------

Co-authored-by: Alexandre Alves <[email protected]>
  • Loading branch information
aalves08 and Alexandre Alves authored Dec 20, 2023
1 parent dd1741a commit 601779a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release-shell-pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
run: yarn install --frozen-lockfile

- name: Publish Shell Package to npm
run: yarn publish-shell-reset-reg
run: ./shell/scripts/publish-shell.sh --npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 10 additions & 0 deletions shell/scripts/publish-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ BASE_DIR="$(
SHELL_DIR=$BASE_DIR/shell/
TMP_DIR=$BASE_DIR/tmp
PUBLISH_ARGS="--no-git-tag-version --access public $PUBLISH_ARGS"
FORCE_PUBLISH_TO_NPM="false"
DEFAULT_YARN_REGISTRY="https://registry.npmjs.org"

if [ ! -d "${BASE_DIR}/node_modules" ]; then
echo "You need to run 'yarn install' first"
Expand All @@ -16,6 +18,14 @@ fi

echo "Publishing Shell Packages"

if [ "$1" == "--npm" ]; then
FORCE_PUBLISH_TO_NPM="true"
fi

if [ "$FORCE_PUBLISH_TO_NPM" == "true" ]; then
export YARN_REGISTRY=$DEFAULT_YARN_REGISTRY
fi

# We use the version from the shell package for the creator packages
# Need to copy them to a temporary location, so we can patch the version number
# before publishing
Expand Down

0 comments on commit 601779a

Please sign in to comment.