Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,28 @@ jobs:
-d "$GITHUB_WORKSPACE/stylua-npm-bin/platforms/$PLATFORM/"
done

# Skip versions that are already on the registry so a failed run can be re-run
- name: Publish platform packages to npm
run: |
for PLATFORM in linux-x64 linux-arm64 darwin-x64 darwin-arm64 win32-x64; do
cd "$GITHUB_WORKSPACE/stylua-npm-bin/platforms/$PLATFORM"
npm publish
SPEC="$(node -p "require('./package.json').name + '@' + require('./package.json').version")"
if npm view "$SPEC" version >/dev/null 2>&1; then
echo "$SPEC is already published, skipping"
else
npm publish
fi
done

- name: Publish main package to npm
working-directory: stylua-npm-bin
run: npm publish
run: |
SPEC="$(node -p "require('./package.json').name + '@' + require('./package.json').version")"
if npm view "$SPEC" version >/dev/null 2>&1; then
echo "$SPEC is already published, skipping"
else
npm publish
fi

release_docker:
name: Publish image to container registry
Expand Down
Loading