修改终端默认名字 #80
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: CI For AppliedWebTerminal | |
| on: | |
| push: | |
| paths: | |
| - .github/workflows/** | |
| - src/** | |
| - gradle/scripts/** | |
| - build.gradle | |
| - gradle.properties | |
| - settings.gradle | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| env: | |
| GITHUB_ACTION_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Java 21 | |
| uses: actions/[email protected] | |
| with: | |
| distribution: zulu | |
| java-version: 21 | |
| - name: make gradle wrapper executable | |
| if: ${{ runner.os != 'Windows' }} | |
| run: chmod +x ./gradlew | |
| - name: Build with Gradle | |
| uses: gradle/actions/[email protected] | |
| - name: Build | |
| run: ./gradlew build | |
| - name: Read Properties | |
| id: 'properties' | |
| uses: christian-draeger/[email protected] | |
| with: | |
| path: gradle.properties | |
| properties: 'mod_id mod_name' | |
| - name: Get Version | |
| id: var | |
| run: | | |
| MESSAGE=$(ls build/libs/* | grep sources.jar -v | grep dev.jar -v | grep slim.jar -v | awk -F '${{ steps.properties.outputs.mod_id }}-|.jar' '{print $2}') | |
| echo version=$MESSAGE >> $GITHUB_OUTPUT | |
| - name: Upload a Build Artifact | |
| uses: actions/[email protected] | |
| with: | |
| name: "${{ steps.properties.outputs.mod_name }} ${{ steps.var.outputs.version }}" | |
| path: | | |
| build/libs/${{ steps.properties.outputs.mod_id }}-${{ steps.var.outputs.version }}.jar | |
| build/libs/${{ steps.properties.outputs.mod_id }}-${{ steps.var.outputs.version }}-sources.jar |