Skip to content

Commit

Permalink
fix: publish-stable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
michelchau committed Jan 11, 2024
1 parent 1e27873 commit 0477a50
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ on:
- decline
jobs:
publish-stable:
if: 'startsWith(github.ref, ''refs/heads/main'')'
if: ${{ startsWith(github.ref, 'refs/heads/main')}}
name: Publish stable
runs-on: ubuntu-latest
steps:
Expand All @@ -90,19 +90,18 @@ jobs:
uses: ./.github/actions/build-essential
- name: Run publish script
env:
SENTRY_AUTH_TOKEN: '${{ secrets.SENTRY_AUTH_TOKEN }}'
YARN_NPM_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
inputs=$(echo '${{ toJSON(github.event.inputs) }}' | jq -c)
package_names=$(echo $inputs | jq -r 'keys | .[]')
specifiers=""
for package in $package_names; do
package_release_type=$(echo $inputs | jq -r --arg k "$package" '.[$k]')
if
if ["$package_name == slicemachine/*" && "package_release_type" != "decline"]; then
package_release_type=$(echo $inputs | jq -r --arg k "$package" '.[$k]')
if [[ $package == "slicemachine/"* && $package_release_type != "decline" ]]; then
specifiers+="@$package:$package_release_type "
elif [ "package_release_type" != "decline" ]; then
elif [ $package_release_type != "decline" ]; then
specifiers+="$package:$package_release_type "
fi
fi
done
yarn publish stable --dry-run $specifiers
echo yarn publish stable --dry-run $specifiers

0 comments on commit 0477a50

Please sign in to comment.