-
Notifications
You must be signed in to change notification settings - Fork 68
59 lines (50 loc) · 1.71 KB
/
nightly.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Build script credit to https://github.com/OpenIntelWireless/itlwm/blob/master/.github/workflows/main.yml
name: Nightly Build
on:
push:
branches: [master]
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '10'
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: github
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build Artifact
run: |
./gradlew build
rm -rf build/libs/*-plain.jar
cp build/libs/*.jar "build/libs/aqua-nightly.jar"
- name: Generate Prerelease Release Notes
run: |
echo '### Nightly Release' >> ReleaseNotes.md
echo 'This nightly release is automatically built by github actions.' >> ReleaseNotes.md
echo '### The latest five updates are:' >> ReleaseNotes.md
git log -"5" --format="- %H %s" | sed '/^$/d' >> ReleaseNotes.md
- name: Delete previous nightly release
run: |
gh release delete --cleanup-tag --yes --repo $GITHUB_REPOSITORY nightly || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish GitHub Release
uses: ncipollo/release-action@v1
with:
bodyFile: ReleaseNotes.md
artifacts: "build/libs/aqua-nightly.jar"
tag: "nightly"
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
- name: Mark release undraft
run: |
gh release edit nightly --draft=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}