aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: afbd742cc1d218c5644f070625ddf7ca0368569d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Java CI with Gradle

on: [ push, pull_request ]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ 11, 17 ]
      fail-fast: true
    steps:
      - name: Checkout
        uses: actions/checkout@v3.0.0
      - name: Set up JDK ${{ matrix.java }}
        uses: actions/setup-java@v3.0.0
        with:
          distribution: adopt
          java-version: ${{ matrix.java }}
      - name: Build LimboAuth
        run: ./gradlew build
      - name: Upload LimboAuth
        uses: actions/upload-artifact@v3.0.0
        with:
          name: LimboAuth Built On ${{ matrix.java }} JDK
          path: "build/libs/limboauth*.jar"
      - uses: dev-drprasad/delete-tag-and-release@v0.2.0
        with:
          delete_release: true
          tag_name: dev-build-jdk-${{ matrix.java }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Release the build
        uses: ncipollo/release-action@v1
        with:
          artifacts: "build/libs/limboauth*.jar"
          body: ${{ join(github.event.commits.*.message, '\n') }}
          prerelease: true
          name: JDK ${{ matrix.java }} Dev-build
          tag: dev-build-jdk-${{ matrix.java }}