|
1 | | -name: AllMusic Server |
| 1 | +# This workflow uses actions that are not certified by GitHub. |
| 2 | +# They are provided by a third-party and are governed by |
| 3 | +# separate terms of service, privacy policy, and support |
| 4 | +# documentation. |
| 5 | +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time |
| 6 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle |
| 7 | + |
| 8 | +name: AllMusic Client |
2 | 9 |
|
3 | 10 | on: |
4 | 11 | push: |
5 | 12 | # Sequence of patterns matched against refs/heads |
6 | | - branches: |
| 13 | + branches: |
7 | 14 | - 'releases/**' |
8 | 15 | # Sequence of patterns matched against refs/tags |
9 | | - tags: |
| 16 | + tags: |
10 | 17 | - '*' |
11 | 18 |
|
12 | 19 | jobs: |
13 | | - build_all: |
| 20 | + build_onejar_fabric_1_16_5: |
14 | 21 | runs-on: windows-latest |
15 | 22 | permissions: |
16 | 23 | contents: read |
17 | 24 | steps: |
18 | | - - name: Checkout code |
19 | | - uses: actions/checkout@v4 |
20 | | - with: |
21 | | - submodules: 'true' |
22 | | - - name: Set up JDK 25 |
23 | | - uses: actions/setup-java@v4 |
24 | | - with: |
25 | | - java-version: '25' |
26 | | - distribution: 'temurin' |
27 | | - - name: Setup Gradle |
28 | | - uses: gradle/actions/setup-gradle@v3 # v3.1.0 |
29 | | - - name: build |
30 | | - shell: cmd |
31 | | - run: | |
32 | | - gradlew build |
33 | | - - name: update |
34 | | - if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, 'debug') |
35 | | - uses: actions/upload-artifact@v4 |
36 | | - with: |
37 | | - name: "allmusic_server" |
38 | | - path: build/ |
| 25 | + - name: Checkout code |
| 26 | + uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + submodules: 'true' |
| 29 | + - name: Set up JDK 25 |
| 30 | + uses: actions/setup-java@v4 |
| 31 | + with: |
| 32 | + java-version: '25' |
| 33 | + distribution: 'temurin' |
| 34 | + - name: Setup Gradle |
| 35 | + uses: gradle/actions/setup-gradle@v3 |
| 36 | + - name: build |
| 37 | + shell: cmd |
| 38 | + run: | |
| 39 | + gradlew :server:buildServer |
| 40 | + - name: update |
| 41 | + uses: actions/upload-artifact@v4 |
| 42 | + with: |
| 43 | + name: "allmusic_server" |
| 44 | + path: build/ |
| 45 | + - name: Create Pre-release and Upload Assets |
| 46 | + if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, 'debug') |
| 47 | + uses: softprops/action-gh-release@v1 |
| 48 | + with: |
| 49 | + prerelease: true |
| 50 | + tag_name: ${{ github.ref_name }} |
| 51 | + name: "Pre-release ${{ github.ref_name }}" |
| 52 | + body: "自动构建的预发布版本" |
| 53 | + files: | |
| 54 | + build/*.jar |
| 55 | + env: |
| 56 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments