feat: 新增客户端配置中心相关字段及获取方法 #94
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
| name: Snapshot-Java | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| paths-ignore: | |
| - '**.md' | |
| jobs: | |
| check-snapshot: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| IS_SNAPSHOT: ${{ steps.set_output_1.outputs.IS_SNAPSHOT }} | |
| steps: | |
| - name: Checkout codes | |
| uses: actions/checkout@v4 | |
| - name: Check deploy type | |
| id: set_output_1 | |
| run: | | |
| line="$(grep SNAPSHOT VERSION || true)" | |
| echo $line | |
| if [ -n "$line" ]; then | |
| echo "IS_SNAPSHOT=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "IS_SNAPSHOT=false" >> $GITHUB_OUTPUT | |
| fi | |
| snapshot: | |
| runs-on: ubuntu-latest | |
| needs: check-snapshot | |
| if: ${{ needs.check-snapshot.outputs.IS_SNAPSHOT == 'true' }} | |
| steps: | |
| - name: Checkout codes | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '8' | |
| distribution: 'temurin' | |
| server-id: central-portal | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| - name: Publish package | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN }} | |
| run: | | |
| cd source/java | |
| bash build.sh | |
| cd polaris-specification | |
| mvn clean deploy -B -U -Dmaven.test.skip=true |