Skip to content

Commit

Permalink
🏗️ 调整 ci
Browse files Browse the repository at this point in the history
  • Loading branch information
li-xunhuan committed Jul 31, 2024
1 parent a1c69db commit 4c0d7d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
- name: Publish to the Maven Central Repository
run: |
mvn clean package deploy -Psnapshot,!develop -pl mica-mqtt-codec,mica-mqtt-common,mica-mqtt-client,mica-mqtt-server,starter/mica-mqtt-client-spring-boot-starter,starter/mica-mqtt-server-spring-boot-starter,starter/jfinal-mica-mqtt-client,starter/jfinal-mica-mqtt-server
chmod +x ./deploy.sh
./deploy.sh snapshot
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
Expand Down
11 changes: 9 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ printf "\n"
mvn -version
printf "\n"

## 3. deploy
## 3. 环境
profile=${1:"release"}

## 4. deploy
modules="mica-mqtt-codec,mica-mqtt-common,"
modules="$modules mica-mqtt-client,mica-mqtt-server,"
modules="$modules starter/mica-mqtt-client-spring-boot-starter,"
Expand All @@ -17,4 +20,8 @@ modules="$modules starter/mica-mqtt-client-solon-plugin,"
modules="$modules starter/mica-mqtt-server-solon-plugin,"
modules="$modules starter/mica-mqtt-client-jfinal-plugin,"
modules="$modules starter/mica-mqtt-server-jfinal-plugin"
mvn clean package deploy -Prelease -pl "$modules"
if [ "$profile" == "snapshot" ]; then
mvn clean package deploy -Psnapshot,!develop -pl "$modules"
else
mvn clean package deploy -Prelease -pl "$modules"
fi

0 comments on commit 4c0d7d1

Please sign in to comment.