Skip to content

Commit

Permalink
feat: temp update
Browse files Browse the repository at this point in the history
  • Loading branch information
liujuping committed Dec 13, 2023
1 parent 9e4f69f commit 455b89e
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/publish npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish NPM Packages
on: push

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # 根据项目需求更改 Node.js 版本

- name: Check for package.json changes
id: package-json-changes
run: |
CHANGED_PKG_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- 'packages/*/package.json')
if [ -z "$CHANGED_PKG_FILES" ]; then
echo "No package.json changes detected."
echo "CHANGED_PACKAGES=none" >> $GITHUB_ENV
else
CHANGED_DIRS=$(echo "$CHANGED_PKG_FILES" | xargs -L1 dirname)
echo "CHANGED_PACKAGES=$CHANGED_DIRS" >> $GITHUB_ENV
echo "Changed package.json files: $CHANGED_PKG_FILES"
fi
- name: Publish packages
if: env.CHANGED_PACKAGES != 'none'
run: |
for dir in $CHANGED_PACKAGES; do
echo "Entering directory $dir"
cd $dir
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [[ $PACKAGE_VERSION == *beta* ]]; then
echo "Publishing $PACKAGE_NAME@$PACKAGE_VERSION as beta..."
npm publish --tag beta
else
echo "Publishing $PACKAGE_NAME@$PACKAGE_VERSION..."
npm publish
fi
cd -
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion packages/plugin-view-manager-pane/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alilc/lowcode-plugin-view-manager-pane",
"version": "1.0.4-beta.6",
"version": "1.0.4-beta.7",
"description": "alibaba lowcode editor undo redo plugin",
"files": [
"es",
Expand Down

0 comments on commit 455b89e

Please sign in to comment.