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 30aaf66
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/publish npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish NPM Packages
on: push

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # 完全克隆

- 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: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
CHANGED_PKG_FILES=$(git diff --name-only HEAD~1 HEAD -- '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
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm install
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 }}
3 changes: 2 additions & 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 All @@ -27,6 +27,7 @@
"@alib/build-scripts": "^0.1.3",
"@alilc/build-plugin-alt": "^1.0.1",
"@alilc/lowcode-engine": "^1.0.0",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@types/react": "^16.9.13",
"@types/react-dom": "^16.9.4",
"build-plugin-fusion": "^0.1.22",
Expand Down

0 comments on commit 30aaf66

Please sign in to comment.