From cfa2f6f64dcc2e1e0dca0737f2d298fd616409b6 Mon Sep 17 00:00:00 2001 From: Russell Banks <74878137+russellbanks@users.noreply.github.com> Date: Tue, 16 May 2023 19:05:25 +0100 Subject: [PATCH] Create nightly releases --- .github/workflows/Build.yml | 42 ++++++++++++++++++++++++++++++++++++ .github/workflows/kotlin.yml | 22 ------------------- 2 files changed, 42 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/Build.yml delete mode 100644 .github/workflows/kotlin.yml diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml new file mode 100644 index 0000000..71b97df --- /dev/null +++ b/.github/workflows/Build.yml @@ -0,0 +1,42 @@ +name: Build + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup JDK + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Build with Gradle + run: ./gradlew build + + - name: Build Shadow JAR + run: ./gradlew shadowJar + + - name: Rename assets to Notify-nightly + if: github.repository == 'russellbanks/Notify' && github.ref == 'refs/heads/main' + shell: pwsh + run: | + Get-ChildItem -Recurse -Filter "Notify*" -Include "*-all.jar" | ForEach-Object { + Rename-Item $_.FullName -NewName "Notify-nightly$($_.Extension)" + } + + - name: Release nightly JAR + if: github.repository == 'russellbanks/Notify' && github.ref == 'refs/heads/main' + uses: softprops/action-gh-release@v1 + with: + name: Nightly release + tag_name: nightly + prerelease: true + files: build/libs/Notify-nightly.jar diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml deleted file mode 100644 index f39f8f5..0000000 --- a/.github/workflows/kotlin.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Kotlin CI - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup JDK - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 17 - - - name: Setup Gradle - uses: gradle/gradle-build-action@v2 - - - name: Build with Gradle - run: ./gradlew build