Skip to content

Commit

Permalink
Merge pull request #59 from OneLiteFeatherNET/develop
Browse files Browse the repository at this point in the history
Release 1.3.0
  • Loading branch information
TheMeinerLP authored Jun 14, 2024
2 parents d0a0e95 + 864f063 commit 309a645
Show file tree
Hide file tree
Showing 18 changed files with 229 additions and 303 deletions.
4 changes: 3 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"ignoreDeps": [],
"labels": ["Renovate"],
"rebaseWhen": "conflicted",
"schedule": ["on the first day of the month"]
"schedule": ["on the first day of the month"],
"baseBranches": ["develop"],
"assigneesFromCodeOwners": true
}
25 changes: 25 additions & 0 deletions .github/workflows/announce-release-on-discord.yml
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/[email protected]
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 }}/>"
5 changes: 3 additions & 2 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Build PR
name: Build Pull Request
on: [pull_request]
jobs:
build_pr:
name: Check PR if can build
if: github.repository_owner == 'OneLiteFeatherNET'
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -18,4 +19,4 @@ jobs:
distribution: temurin
java-version: 17
- name: Build on ${{ matrix.os }}
run: ./gradlew clean build
run: ./gradlew clean build -x test
67 changes: 0 additions & 67 deletions .github/workflows/build.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/close_invalid_prs.yml
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:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: draft release
name: Draft release
on:
push:
branches:
Expand Down
58 changes: 0 additions & 58 deletions CHANGELOG.md

This file was deleted.

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ Discord: https://discord.onelitefeather.net

## Permissions
- `attollo.use` - Allows the player to use the elevator
- `attollo.command.attollo` - Creates a debug paste for bug tickets

## Commands
- `attollo debugpaste` - Creates a debug paste for bug tickets

## Configuration
```yaml
Expand Down
7 changes: 7 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
}
43 changes: 43 additions & 0 deletions build-logic/src/main/kotlin/extensions.kt
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.
Loading

0 comments on commit 309a645

Please sign in to comment.