Skip to content

Commit

Permalink
Merge pull request #255 from FTBTeam/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
desht authored Jun 19, 2023
2 parents dee8d56 + 714bbc8 commit 29ab314
Show file tree
Hide file tree
Showing 67 changed files with 864 additions and 823 deletions.
49 changes: 12 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,23 @@
name: Java CI
name: Java CI - Build on Push

on:
push:
branches:
# main and dev versions for each mc ver here
- "1.19/main"
- "1.19/dev"
branches: [ main, dev, "1.*" ]
workflow_dispatch:
inputs:
norelease:
description: 'Do not publish'
skip_maven_publish:
description: 'Skip Maven publishing'
required: true
default: 'false'

jobs:
build:
runs-on: ubuntu-latest
if: |
!contains(github.event.head_commit.message, '[ci skip]')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 30 # Gets the last 30 commits so the changelog might work
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build and Publish with Gradle
uses: gradle/gradle-build-action@v2
env:
FTB_MAVEN_TOKEN: ${{ secrets.FTB_MAVEN_TOKEN }}
SAPS_TOKEN: ${{ secrets.SAPS_TOKEN }}
with:
arguments: build publish --stacktrace --no-daemon
- name: Release to CurseForge
uses: gradle/gradle-build-action@v2
if: |
contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[norelease]') && github.event.inputs.norelease != 'true'
env:
GIT_COMMIT: ${{ github.event.after }}
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }}
with:
arguments: build curseforge --stacktrace --no-daemon
!contains(github.event.head_commit.message, '[ciskip]')
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
with:
curse-publish-task: ""
maven-snapshots: true
secrets:
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}
saps-token: ${{ secrets.SAPS_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Java CI - Build Release

on:
release:
types: [ published ]

jobs:
build:
if: |
!contains(github.event.head_commit.message, '[ciskip]')
uses: FTBTeam/mods-meta/.github/workflows/standard-release.yml@main
with:
curse-publish-task: curseforge
secrets:
ftb-maven-token: ${{ secrets.FTB_MAVEN_TOKEN }}
saps-token: ${{ secrets.SAPS_TOKEN }}
curse-token: ${{ secrets.CURSEFORGE_KEY }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2001.1.2]

### Added
* Updated to MC 1.20.1, based on 1902.3.22 release

## [1902.3.22]

### Added
Expand Down
17 changes: 13 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.2-SNAPSHOT" apply false
}

architectury {
Expand All @@ -26,11 +26,13 @@ allprojects {
apply plugin: "maven-publish"
apply from: "https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/git-md-changelog.gradle"

def ENV = System.getenv()
version = "${mod_version}-build.${ENV.GITHUB_RUN_NUMBER ?: 9999}"
version = project.mod_version
group = project.maven_group
archivesBaseName = project.archives_base_name

// needs to be done AFTER version is set
apply from: "https://raw.githubusercontent.com/FTBTeam/mods-meta/main/gradle/publishing.gradle"

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = 17

compileJava {
Expand All @@ -51,7 +53,14 @@ allprojects {
}

maven {
url "https://maven.saps.dev/minecraft"
url "https://maven.saps.dev/releases"
content {
includeGroup "dev.latvian.mods"
includeGroup "dev.ftb.mods"
}
}
maven {
url "https://maven.saps.dev/snapshots"
content {
includeGroup "dev.latvian.mods"
includeGroup "dev.ftb.mods"
Expand Down
21 changes: 11 additions & 10 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,30 @@ artifacts {

publishing {
publications {
mavenCommon(MavenPublication) {
artifactId = rootProject.archivesBaseName
mavenForge(MavenPublication) {
artifactId = "${rootProject.archives_base_name}"
version ftbPublishing.mavenVersion
from components.java
}
}

repositories {
if (ENV.FTB_MAVEN_TOKEN) {
if (ftbPublishing.ftbToken) {
maven {
url "https://maven.ftb.dev/release"
url ftbPublishing.ftbURL
credentials {
username = "ftb"
password = "${ENV.FTB_MAVEN_TOKEN}"
username = ftbPublishing.ftbUser
password = ftbPublishing.ftbToken
}
}
}

if (ENV.SAPS_TOKEN) {
if (ftbPublishing.sapsToken) {
maven {
url "https://maven.saps.dev/minecraft"
url ftbPublishing.sapsURL
credentials {
username = "ftb"
password = "${ENV.SAPS_TOKEN}"
username = ftbPublishing.sapsUser
password = ftbPublishing.sapsToken
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ protected void apply(JsonObject object, ResourceManager resourceManager, Profile
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.rgb(0x683A2D)));
} else if (FTBCUtils.isRail(block)) {
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.rgb(0x888888)));
} else if (block.defaultMaterialColor() != null) {
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.rgb(block.defaultMaterialColor().col)));
} else if (block.defaultMapColor() != null) {
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.rgb(block.defaultMapColor().col)));
} else {
BLOCK_ID_TO_COLOR_MAP.put(id, new CustomBlockColor(Color4I.RED));
}
Expand Down
Loading

0 comments on commit 29ab314

Please sign in to comment.