-
Notifications
You must be signed in to change notification settings - Fork 1
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 #59 from OneLiteFeatherNET/develop
Release 1.3.0
- Loading branch information
Showing
18 changed files
with
229 additions
and
303 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
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,25 @@ | ||
name: Announce release on discord | ||
on: | ||
release: | ||
types: [ published ] | ||
jobs: | ||
send_announcement: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send custom message with args | ||
env: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
DISCORD_USERNAME: Attollo Release | ||
DISCORD_AVATAR: https://raw.githubusercontent.com/OneLiteFeatherNET/Attollo/master/.github/assets/Atollo.png | ||
uses: Ilshidur/action-discord@0.3.2 | ||
with: | ||
args: | | ||
"<@&1102542159447601212>" | ||
"" | ||
"<:attollo:1102543562727501845> **Attollo ${{ github.event.release.tag_name }} has been released!**" | ||
"" | ||
"Click here to view changelog: https://github.com/OneLiteFeatherNET/Attollo/releases/tag/${{ github.event.release.tag_name }}" | ||
"" | ||
"The download is available at:" | ||
"- Hangar: <https://hangar.papermc.io/OneLiteFeather/Attollo/versions/${{ github.event.release.tag_name }}/>" | ||
"- Modrinth: <https://modrinth.com/plugin/attollo/version/${{ github.event.release.tag_name }}/>" |
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.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Close invalid PRs | ||
name: Close invalid Pull Requests | ||
|
||
on: | ||
pull_request_target: | ||
|
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,30 @@ | ||
name: Publish Attollo to platforms | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
jobs: | ||
Publish: | ||
name: 'Publish to EldoNexus, Modrinth and Hangar' | ||
# Run on all label events (won't be duplicated) or all push events or on PR syncs not from the same repo | ||
if: github.repository_owner == 'OneLiteFeatherNET' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v3 | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
cache: gradle | ||
java-version: 17 | ||
- name: Publish to Jar | ||
run: ./gradlew build publishAllPublicationsToHangar modrinth publish -x test | ||
env: | ||
ELDO_USERNAME: "${{ secrets.ELDO_USERNAME }}" | ||
ELDO_PASSWORD: "${{ secrets.ELDO_PASSWORD }}" | ||
HANGAR_SECRET: ${{secrets.HANGAR_KEY}} | ||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_KEY }} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: draft release | ||
name: Draft release | ||
on: | ||
push: | ||
branches: | ||
|
This file was deleted.
Oops, something went wrong.
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 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,7 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} |
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,43 @@ | ||
import org.gradle.api.Project | ||
import org.gradle.api.publish.PublishingExtension | ||
import org.gradle.api.publish.maven.MavenPublication | ||
import org.gradle.kotlin.dsl.configure | ||
import org.gradle.kotlin.dsl.get | ||
import org.gradle.kotlin.dsl.named | ||
import java.io.ByteArrayOutputStream | ||
|
||
fun Project.publishShadowJar() { | ||
configurePublication { | ||
artifact(tasks["shadowJar"]) | ||
artifact(tasks["sourcesJar"]) | ||
} | ||
} | ||
|
||
private fun Project.configurePublication(configurer: MavenPublication.() -> Unit) { | ||
extensions.configure<PublishingExtension> { | ||
publications.named<MavenPublication>("mavenJava") { | ||
apply(configurer) | ||
} | ||
} | ||
} | ||
|
||
fun Project.latestCommitHash(): String { | ||
return runGitCommand(listOf("rev-parse", "--short", "HEAD")) | ||
} | ||
|
||
fun Project.latestCommitMessage(): String { | ||
return runGitCommand(listOf("log", "-1", "--pretty=%B")) | ||
} | ||
|
||
fun Project.branchName(): String { | ||
return runGitCommand(listOf("rev-parse", "--abbrev-ref", "HEAD")) | ||
} | ||
|
||
fun Project.runGitCommand(args: List<String>): String { | ||
val byteOut = ByteArrayOutputStream() | ||
exec { | ||
commandLine = listOf("git") + args | ||
standardOutput = byteOut | ||
} | ||
return byteOut.toString(Charsets.UTF_8.name()).trim() | ||
} |
Empty file.
Oops, something went wrong.