-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #393 from Team-EnderIO/feature/nightly-actions
- Loading branch information
Showing
6 changed files
with
200 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Nightly Build | ||
env: | ||
CI: true | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
NIGHTLY: true | ||
|
||
# Run on all develop pushes | ||
on: | ||
push: | ||
branches: | ||
- 'dev/*' | ||
|
||
# Cancel if a new push is sent | ||
# https://stackoverflow.com/a/70972844 | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: nightly-build | ||
path: build/libs/*.jar | ||
|
||
- name: Discord Notification | ||
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: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Release Build | ||
env: | ||
CI: true | ||
BUILD_VERSION: ${{ github.event.release.tag_name }} | ||
CHANGELOG: ${{ github.event.release.body }} | ||
PUBLISH: true | ||
|
||
# Run when release is created on GitHub | ||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Clean | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: clean | ||
|
||
- name: Build | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: release-build | ||
path: build/libs/*.jar | ||
|
||
- name: Publish to CurseForge and Modrinth | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
CURSEFORGE_TOKEN: ${{ secrets.TOKEN_CURSEFORGE }} | ||
MODRINTH_TOKEN: ${{ secrets.TOKEN_MODRINTH }} | ||
with: | ||
arguments: publishMod | ||
|
||
# TODO: Publish to maven. | ||
|
||
- name: Upload to GitHub Releases | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
token: ${{ secrets.TOKEN_GITHUB }} | ||
files: build/libs/*.jar | ||
|
||
- name: Truncate Build Notes | ||
uses: 2428392/[email protected] | ||
id: truncatedChangelog | ||
with: | ||
stringToTruncate: ${{ github.event.release.body }} | ||
maxLength: 1000 | ||
|
||
- name: Discord Notification | ||
uses: tsickert/[email protected] | ||
with: | ||
webhook-url: ${{ secrets.RELEASE_DISCORD_WEBHOOK }} | ||
embed-title: Ender IO ${{ github.event.release.tag_name }} Released | ||
embed-description: ${{ steps.truncatedChangelog.outputs.string }} | ||
avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/enderface.png | ||
username: Ender IO Releases | ||
embed-footer-text: ${{ github.event.release.tag_name }} | ||
embed-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.