feat(landing): 更新首页英雄区域内容和样式 #629
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | |
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: 构建&发布 | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| tags: | |
| - v** | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| with: | |
| path: smart-mqtt | |
| - uses: actions/checkout@v4 | |
| name: 下载 feat | |
| with: | |
| repository: smartboot/feat | |
| path: feat | |
| - uses: actions/checkout@v4 | |
| name: 下载 smart-mqtt | |
| with: | |
| repository: smartboot/smart-mqtt-enterprise | |
| token: ${{ secrets.GH_PAT }} | |
| path: smart-mqtt-enterprise | |
| # 前端构建 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: | | |
| cd smart-mqtt-enterprise/ui | |
| npm install | |
| - name: Build frontend | |
| run: | | |
| cd smart-mqtt-enterprise/ui | |
| npm run build | |
| - name: Copy frontend to plugins | |
| run: | | |
| mkdir -p smart-mqtt/plugins/enterprise-plugin/src/main/resources/static | |
| cp -r smart-mqtt-enterprise/ui/dist/* smart-mqtt/plugins/enterprise-plugin/src/main/resources/static/ | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '8' | |
| - name: Set up Maven 3.9 | |
| uses: stCarolas/setup-maven@v5 | |
| - name: Build Feat | |
| run: FEAT_LICENSE=${{ secrets.FEAT_LICENSE }} mvn -B install --file feat/pom.xml -DskipTests -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 | |
| - name: 编译 smart-mqtt 基础组件 | |
| run: mvn -B install --file smart-mqtt/pom.xml -DskipTests -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 | |
| - name: 编译 smart-mqtt broker 模块 | |
| run: mvn -B install --file smart-mqtt/smart-mqtt-broker/pom.xml -DskipTests -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 | |
| - name: 构建 MQTT Broker社区版 | |
| run: FEAT_LICENSE=${{ secrets.FEAT_LICENSE }} mvn -B -f smart-mqtt-enterprise/poms/pom.xml clean package -DskipTests -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 | |
| - name: deploy dir | |
| run: | | |
| mkdir -p smart-mqtt-enterprise/deploy/plugins | |
| cp smart-mqtt-enterprise/poms/target/smart-mqtt-broker-*.jar smart-mqtt-enterprise/deploy/smart-mqtt.jar | |
| cp smart-mqtt-enterprise/start.sh smart-mqtt-enterprise/deploy/ | |
| ## 构建企业版插件 | |
| - name: 构建 MQTT Broker企业版 | |
| run: FEAT_LICENSE=${{ secrets.FEAT_LICENSE }} mvn -B -f smart-mqtt-enterprise/poms/pom.xml clean package -Penterprise -DskipTests -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 | |
| - name: Build enterprise-plugin | |
| run: FEAT_LICENSE=${{ secrets.FEAT_LICENSE }} mvn -B -f smart-mqtt/plugins/pom.xml clean package -DskipTests -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 | |
| - name: Copy enterprise-plugin | |
| run: | | |
| cp smart-mqtt-enterprise/poms/target/smart-mqtt-broker-*.jar smart-mqtt-enterprise/deploy/smart-mqtt.jar | |
| cp smart-mqtt/plugins/*-plugin/target/*.jar smart-mqtt-enterprise/deploy/plugins | |
| rm -rf smart-mqtt-enterprise/deploy/plugins/original-*.jar | |
| mkdir -p smart-mqtt-enterprise/deploy/plugins/_storage/enterprise-plugin/repository | |
| mv smart-mqtt-enterprise/deploy/plugins/*.jar smart-mqtt-enterprise/deploy/plugins/_storage/enterprise-plugin/repository | |
| mv smart-mqtt-enterprise/deploy/plugins/_storage/enterprise-plugin/repository/enterprise-plugin-*.jar smart-mqtt-enterprise/deploy/plugins/ | |
| - | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - | |
| name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: smart-mqtt-enterprise | |
| push: true | |
| no-cache: true | |
| tags: smartboot/smart-mqtt:latest,smartboot/smart-mqtt:${{ github.ref_name }} | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: smart-mqtt-enterprise | |
| file: smart-mqtt-enterprise/Dockerfile_alpine | |
| push: true | |
| no-cache: true | |
| tags: smartboot/smart-mqtt:latest-alpine,smartboot/smart-mqtt:${{ github.ref_name }}-alpine | |
| platforms: linux/amd64,linux/arm64 | |
| - name: 上传 smart-mqtt-full 制品 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: smart-mqtt-full-${{ github.ref_name }} | |
| compression-level: 0 | |
| path: smart-mqtt-enterprise/deploy |