Merge pull request #746 from gaoxingzaq/pdfjs2 #501
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://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
| name: Java CI with Maven | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' # 使用 Eclipse Temurin (AdoptOpenJDK 的继任者) | |
| cache: 'maven' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Build with Maven | |
| run: mvn -B package -Dmaven.test.skip=true --file pom.xml | |
| - name: Upload Linux distribution package | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kkfileview-linux | |
| path: server/target/*.tar.gz | |
| retention-days: 7 | |
| - name: Upload Windows distribution package | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kkfileview-windows | |
| path: server/target/*.zip | |
| retention-days: 7 |