Skip to content

Commit

Permalink
update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
PssbleTrngle committed Jul 29, 2022
2 parents 2009d24 + fa1d294 commit 0077be0
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 46 deletions.
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Bug Report
description: File a bug report
labels: ["bug"]
assignees: [PssbleTrngle]

body:
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
validations:
required: true

- type: input
id: version-version
attributes:
label: Mod Version
validations:
required: true

- type: dropdown
id: minecraft-version
attributes:
label: Minecraft Version
multiple: false
options:
- 1.16
- 1.18
- 1.19

- type: dropdown
id: loader
attributes:
label: Minecraft Loader
multiple: false
options:
- Fabric
- Forge

- type: input
id: loader-version
attributes:
label: Fabric/Forge Version
validations:
required: true

- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Feature Request
description: Suggest a feature
labels: ["enhancement", "feature", "feature-request"]
assignees: [PssbleTrngle]

body:
- type: textarea
id: idea
attributes:
label: Describe the feature you have in mind.
placeholder: So I was think about...
validations:
required: true

- type: textarea
id: problem-solving
attributes:
label: Does this solve a particular problem?
placeholder: Yes, it balances...
validations:
required: false
37 changes: 16 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
on: [pull_request, push]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
17, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
java: [17]
os: [ubuntu-20.04, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- uses: actions/checkout@v3

- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: corretto

- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew

- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: build/libs/
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: 17
distribution: corretto

- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- run: chmod +x ./gradlew

- name: Update mod version
uses: christian-draeger/[email protected]
with:
path: 'gradle.properties'
property: 'mod_version'
value: ${{ github.event.release.tag_name }}

- name: build
run: ./gradlew build

- name: upload to curseforge
run: ./gradlew curseforge
env:
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
CHANGELOG: ${{ github.event.release.body }}

- name: upload to modrinth
run: ./gradlew modrinth
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
CHANGELOG: ${{ github.event.release.body }}

- name: publish to github packages
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64 changes: 48 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id "com.modrinth.minotaur" version "2.+"
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
def ENV = System.getenv()

version = project.mod_version
group = project.maven_group

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
gradlePluginPortal()
}

dependencies {
Expand Down Expand Up @@ -50,23 +53,52 @@ java {

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
rename { "${it}_${project.mod_id}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/pssbletrngle/${project.mod_id}")
version = version
credentials {
username = ENV.GITHUB_ACTOR
password = ENV.GITHUB_TOKEN
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
if (ENV.CURSEFORGE_TOKEN) curseforge {
apiKey = ENV.CURSEFORGE_TOKEN
project {
id = project.curseforge_project_id
addGameVersion project.minecraft_version
addGameVersion 'Fabric'
changelog = ENV.CHANGELOG
changelogType = 'markdown'
releaseType = project.release_type
mainArtifact(jar) {
displayName = "Version ${version}"
}
}
}

if (ENV.MODRINTH_TOKEN) modrinth {
token = ENV.MODRINTH_TOKEN
projectId = project.modrinth_project_id
versionNumber = version
versionName = "Version ${version}"
changelog = ENV.CHANGELOG
gameVersions = [project.minecraft_version]
loaders = ["fabric"]
versionType = project.release_type
uploadFile = jar
}
19 changes: 11 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.6
# check these on https://fabricmc.net/develop
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.6

# Mod Properties
mod_version = 1.1.0
maven_group = com.possible_triangle
archives_base_name = knowmyname
mod_version=0.0.0-dev
mod_id=knowmyname
release_type=release

# Dependencies
fabric_version=0.55.1+1.19
fabric_version=0.55.1+1.19

curseforge_project_id=629673
modrinth_project_id=PswX9vWM
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"issues": "https://github.com/PssbleTrngle/KnowMyName/issues"
},
"license": "CC0-1.0",
"environment": "server",
"environment": "*",
"entrypoints": {
"main": [
"com.possible_triangle.knowmyname.KnowMyNameMod"
Expand Down

0 comments on commit 0077be0

Please sign in to comment.