diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index d61aa69..1b2b1cd 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -10,13 +10,11 @@ on: - master jobs: - build: - + buildlinux: runs-on: ubuntu-latest permissions: contents: read packages: write - steps: - uses: actions/checkout@v4 - name: Set up JDK 21 @@ -24,14 +22,58 @@ jobs: with: java-version: '21' distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - + server-id: github + settings-path: ${{ github.workspace }} - name: Build with Maven run: mvn -B package --file pom.xml - - name: Upload a Build Artifact uses: actions/upload-artifact@v4.6.2 with: + name: linux path: target/ACGPicDownload-*-jar-with-dependencies.jar - retention-days: 30 + retention-days: 7 + buildwin: + runs-on: windows-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + server-id: github + settings-path: ${{ github.workspace }} + - name: Build with Maven + run: mvn -B package --file pom.xml + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.6.2 + with: + name: win + path: target/ACGPicDownload-*-jar-with-dependencies.jar + retention-days: 7 + buildmacos: + runs-on: macos-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + server-id: github + settings-path: ${{ github.workspace }} + - name: Build with Maven + run: mvn -B package --file pom.xml + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.6.2 + with: + name: macos + path: target/ACGPicDownload-*-jar-with-dependencies.jar + retention-days: 7 +