2023-12-21 15:10:08 +08:00
|
|
|
# Build script credit to https://github.com/OpenIntelWireless/itlwm/blob/master/.github/workflows/main.yml
|
|
|
|
name: Nightly Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-12-23 08:01:28 +08:00
|
|
|
branches: [master]
|
2024-02-07 13:48:32 +08:00
|
|
|
paths: ['src/**']
|
2024-02-08 05:35:12 +08:00
|
|
|
workflow_dispatch:
|
2023-12-21 15:10:08 +08:00
|
|
|
|
|
|
|
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
|
2024-02-08 05:26:59 +08:00
|
|
|
run: bash ./tools/build.sh
|
2023-12-21 15:10:08 +08:00
|
|
|
|
2023-12-23 08:06:01 +08:00
|
|
|
- name: Delete previous nightly release
|
|
|
|
run: |
|
2023-12-23 08:10:28 +08:00
|
|
|
gh release delete --cleanup-tag --yes --repo $GITHUB_REPOSITORY nightly || true
|
2023-12-21 15:10:08 +08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Publish GitHub Release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
2024-02-08 05:26:59 +08:00
|
|
|
bodyFile: "build/release/ReleaseNotes.md"
|
|
|
|
artifacts: "build/libs/aqua-nightly.jar,build/aqua-nightly.zip"
|
2023-12-23 08:06:01 +08:00
|
|
|
tag: "nightly"
|
2023-12-21 15:10:08 +08:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2023-12-23 07:37:55 +08:00
|
|
|
draft: false
|
2023-12-23 08:01:28 +08:00
|
|
|
|
|
|
|
- name: Mark release undraft
|
|
|
|
run: |
|
2023-12-23 08:06:01 +08:00
|
|
|
gh release edit nightly --draft=false
|
2023-12-23 08:01:28 +08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|