-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.07 KB
/
Build.yml
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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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: 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