Skip to content

Commit

Permalink
CI: update RayCLI to v1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorzkrukowski committed Feb 24, 2025
1 parent 87b1f2e commit aaabb71
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ray-cli/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inputs:
npmrc_path:
description: "Path to npmrc file to access private npm packages"
required: false
raycast_alpha_npm_token:
raycast_api_alpha_npm_token:
description: "NPM token for alpha version of @raycast/api"
required: false
outputs:
Expand All @@ -38,4 +38,4 @@ runs:
GITHUB_WORKSPACE: $GITHUB_WORKSPACE
run: |
set -e -o noglob
${{ github.action_path }}/ray_cli.sh "${{ inputs.command }}" "${{ inputs.paths }}" "${{ inputs.access_token }}" "${{ inputs.extension_schema }}" "${{ inputs.allow_owners_only_for_extensions }}" "${{ inputs.npmrc_path }}" "${{ inputs.raycast_alpha_npm_token }}"
${{ github.action_path }}/ray_cli.sh "${{ inputs.command }}" "${{ inputs.paths }}" "${{ inputs.access_token }}" "${{ inputs.extension_schema }}" "${{ inputs.allow_owners_only_for_extensions }}" "${{ inputs.npmrc_path }}" "${{ inputs.raycast_api_alpha_npm_token }}"
8 changes: 4 additions & 4 deletions ray-cli/ray_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ ! -z "$6" ]; then
fi

if [ ! -z "$7" ]; then
raycast_alpha_npm_token=$7
raycast_api_alpha_npm_token=$7
fi

function ray_command_from_string() {
Expand Down Expand Up @@ -121,13 +121,13 @@ for dir in "${paths[@]}" ; do
else
api_version=$(jq '.dependencies."@raycast/api"' package.json)
if [[ "$api_version" == *"alpha"* ]]; then
if [ -z "$raycast_alpha_npm_token" ]; then
echo "::error::Alpha version of @raycast/api used without raycast_alpha_npm_token parameter"
if [ -z "$raycast_api_alpha_npm_token" ]; then
echo "::error::Alpha version of @raycast/api used without raycast_api_alpha_npm_token parameter"
exit_code=1
continue
else
echo "Generating .npmrc for alpha version of @raycast/api"
echo "//npm.pkg.github.com/:_authToken=$raycast_alpha_npm_token" > .npmrc
echo "//npm.pkg.github.com/:_authToken=$raycast_api_alpha_npm_token" > .npmrc
echo "@raycast:registry=https://npm.pkg.github.com" >> .npmrc
echo "legacy-peer-deps=true" >> .npmrc
cleanup_npmrc=true
Expand Down
8 changes: 4 additions & 4 deletions setup-cli/setup_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
set -e

version=$1
raycast_alpha_npm_token=$2
raycast_api_alpha_npm_token=$2

if [[ "$version" == *"alpha"* ]]; then
if [ -z "$raycast_alpha_npm_token" ]; then
echo "::error::Alpha version of @raycast/api used without raycast_alpha_npm_token parameter"
if [ -z "$raycast_api_alpha_npm_token" ]; then
echo "::error::Alpha version of @raycast/api used without raycast_api_alpha_npm_token parameter"
exit 1
else
echo "//npm.pkg.github.com/:_authToken=$raycast_alpha_npm_token" > ~/.npmrc
echo "//npm.pkg.github.com/:_authToken=$raycast_api_alpha_npm_token" > ~/.npmrc
echo "@raycast:registry=https://npm.pkg.github.com" >> ~/.npmrc
echo "legacy-peer-deps=true" >> ~/.npmrc
cleanup_npmrc=true
Expand Down

0 comments on commit aaabb71

Please sign in to comment.