Merge remote-tracking branch 'SlimefunGuguProject/dev' into dev #78
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 | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
| name: Slimefun Dev CI | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| push: | |
| branches: [ master, dev ] | |
| paths: | |
| - 'src/**' | |
| - 'pom.xml' | |
| env: | |
| TZ: 'Asia/Shanghai' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: ${{ vars.JAVA_CI_VERSION || 21 }} | |
| java-package: jdk | |
| architecture: x64 | |
| cache: maven | |
| - name: Publish snapshots | |
| run: | | |
| echo "::add-mask::$MAVEN_ACCOUNT" | |
| echo "::add-mask::$MAVEN_PASSWORD" | |
| mvn -s .mvn/settings.xml -B deploy -Dversioning.disable --errors | |
| env: | |
| MAVEN_ACCOUNT: '${{ secrets.MAVEN_ACCOUNT }}' | |
| MAVEN_PASSWORD: '${{ secrets.MAVEN_PASSWORD }}' | |
| - name: Build Slimefun | |
| run: mvn -B clean package --errors | |
| - name: Get build artifact filename | |
| run: | | |
| cd target && FILENAME=$(find . -maxdepth 1 -mindepth 1 -name "Slimefun-*" | cut -d'/' -f 2) | |
| echo "SLIMEFUN_ARTIFACT_NAME=$FILENAME" >> "$GITHUB_ENV" | |
| cd .. | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.SLIMEFUN_ARTIFACT_NAME }} | |
| path: target/${{ env.SLIMEFUN_ARTIFACT_NAME }} |