Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMcCulloh committed Sep 27, 2023
1 parent 6d29256 commit 53d1002
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,25 +370,29 @@ jobs:
- name: Login to NPM registry
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish npm packages
working-directory: dist
- name: Publish NPM packages
uses: nick-fields/retry@v2
env:
PACKAGE_VERSION: ${{ needs.build.outputs.version }}
run: |
PACKAGES=("@winglang/sdk" "@winglang/compiler" "@wingconsole/design-system" "@wingconsole/ui" "@wingconsole/server" "@wingconsole/app" "winglang")
for PACKAGE in "${PACKAGES[@]}"; do
# Check if already published
VERSION_FOUND=$(npm view "$PACKAGE@$PACKAGE_VERSION" version || true)
if [ "$VERSION_FOUND" = "$PACKAGE_VERSION" ]; then
echo "$PACKAGE@$PACKAGE_VERSION already published, skipping"
continue
fi
# remove "@" and replace "/" with "-"
TARBALL=$(echo "$PACKAGE-$PACKAGE_VERSION.tgz" | sed 's/@//g' | sed 's/\//-/g')
npm publish "$TARBALL" --access public
done
with:
max_attempts: 5
retry_on: error
timeout_minutes: 10
command: |
PACKAGES=("@winglang/sdk" "@winglang/compiler" "@wingconsole/design-system" "@wingconsole/ui" "@wingconsole/server" "@wingconsole/app" "winglang")
for PACKAGE in "${PACKAGES[@]}"; do
# Check if already published
VERSION_FOUND=$(npm view "$PACKAGE@$PACKAGE_VERSION" version --verbose || true)
if [ "$VERSION_FOUND" = "$PACKAGE_VERSION" ]; then
echo "$PACKAGE@$PACKAGE_VERSION already published, skipping"
continue
fi
# remove "@" and replace "/" with "-"
TARBALL=$(echo "$PACKAGE-$PACKAGE_VERSION.tgz" | sed 's/@//g' | sed 's/\//-/g')
npm publish "$TARBALL" --access public --verbose
done
- name: Publish Extension to Visual Studio Marketplace
if: needs.build.outputs.vscode-wing-changed == 'true'
Expand Down

0 comments on commit 53d1002

Please sign in to comment.