Skip to content

Commit

Permalink
[CI] make this nightly thing work
Browse files Browse the repository at this point in the history
  • Loading branch information
LetterN authored May 15, 2024
1 parent c20cc31 commit 30a831e
Showing 1 changed file with 36 additions and 43 deletions.
79 changes: 36 additions & 43 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,56 @@ env:
on:
push:
branches:
- 'dev/*'

# Cancel if a new push is sent
# https://stackoverflow.com/a/70972844
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
- main
workflow_dispatch: # manual trigger

jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: run_nightly-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: 17
distribution: 'temurin'

- name: Make gradlew executable
run: chmod +x ./gradlew

- uses: gradle/actions/setup-gradle@v3
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
run: ./gradlew build

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nightly-build
path: |
build/libs/*.jar
!build/libs/*-partial.jar
- name: Discord Notification Success
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
embed-title: New Nightly Build
embed-description: A new nightly build of Ender IO has been built from the following commit. If you play with this, please remember to report issues! ```${{ github.event.head_commit.message }}```
avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/enderface.png
username: Ender IO Nightowl
embed-footer-text: Build number ${{ github.run_number }}
embed-url: https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/nightly-build.zip # NOTE: Must match "name" of the artifact as set above.
embed-color: 5763719

- name: Discord Notification Failure
if: failure()
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
embed-title: Nightly Build Failed
embed-description: The nightly build failed to compile at this commit. ```${{ github.event.head_commit.message }}```
avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/gray-enderface.png
username: Ender IO Nightowl
embed-footer-text: Build number ${{ github.run_number }}
embed-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
embed-color: 15548997
# - name: Discord Notification Success
# uses: tsickert/[email protected]
# with:
# webhook-url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
# embed-title: New Nightly Build
# embed-description: A new nightly build of Ender IO has been built from the following commit. If you play with this, please remember to report issues! ```${{ github.event.head_commit.message }}```
# avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/enderface.png
# username: Ender IO Nightowl
# embed-footer-text: Build number ${{ github.run_number }}
# embed-url: https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/nightly-build.zip # NOTE: Must match "name" of the artifact as set above.
# embed-color: 5763719

# - name: Discord Notification Failure
# if: failure()
# uses: tsickert/[email protected]
# with:
# webhook-url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
# embed-title: Nightly Build Failed
# embed-description: The nightly build failed to compile at this commit. ```${{ github.event.head_commit.message }}```
# avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/gray-enderface.png
# username: Ender IO Nightowl
# embed-footer-text: Build number ${{ github.run_number }}
# embed-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
# embed-color: 15548997

0 comments on commit 30a831e

Please sign in to comment.