diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf19ade..ed1eb10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,9 +3,11 @@ # certain platforms or Java versions, and provides a first line of defence # against bad commits. -name: build +name: CI + on: push: + branches: [main] tags-ignore: - "**" pull_request: @@ -14,6 +16,8 @@ on: jobs: build: + name: Build + strategy: matrix: # Use these Java versions @@ -24,30 +28,32 @@ jobs: os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} + steps: - - name: checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v4 - - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + - name: Validate Gradle wrapper + uses: gradle/actions/wrapper-validation@v3 - - name: setup jdk ${{ matrix.java }} - uses: actions/setup-java@v3 + - name: Setup JDK ${{ matrix.java }} + uses: actions/setup-java@v4 with: distribution: "temurin" java-version: ${{ matrix.java }} cache: "gradle" - - name: make gradle wrapper executable + - name: Make Gradle wrapper executable if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew - - name: build + - name: Build run: ./gradlew build - - name: capture build artifacts + - name: Capture build artifacts if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from latest java on one OS - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Artifacts + name: jars path: build/libs/ + if-no-files-found: error diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05bc4c8..10dedb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,5 @@ -name: release +name: Release + on: push: tags: @@ -12,15 +13,18 @@ jobs: uses: ./.github/workflows/build.yml make-release: - runs-on: ubuntu-latest + name: Create release needs: build + runs-on: ubuntu-latest + steps: - - uses: actions/download-artifact@v3 + - name: Download artifacts + uses: actions/download-artifact@v4 with: - name: Artifacts + name: jars - - name: create release + - name: Create Release uses: softprops/action-gh-release@v1 with: draft: true diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 1ec4784..0000000 --- a/flake.lock +++ /dev/null @@ -1,26 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1688231357, - "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 73fe54d..0000000 --- a/flake.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - description = "Improve and tweak Minecraft CPU scheduling (again!)"; - - inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; - }; - - outputs = {nixpkgs, ...}: let - systems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; - - forAllSystems = nixpkgs.lib.genAttrs systems; - nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); - - forEachSystem = fn: - forAllSystems (system: - fn { - inherit system; - pkgs = nixpkgsFor.${system}; - }); - in { - devShells = forEachSystem ({pkgs, ...}: { - default = pkgs.mkShell { - packages = with pkgs; [ - jdk17_headless - gradle_7 - ]; - }; - }); - - formatter = forEachSystem ({pkgs, ...}: pkgs.alejandra); - }; -} diff --git a/gradle.properties b/gradle.properties index 261a637..d51de6e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,19 +3,19 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop/ -minecraft_version=1.20.6 -yarn_mappings=1.20.6+build.1 +minecraft_version=1.21 +yarn_mappings=1.21+build.9 loader_version=0.15.11 -#Fabric api -fabric_version=0.98.0+1.20.6 +# Fabric API +fabric_version=0.100.7+1.21 # Mod Properties -mod_version=0.1.3 +mod_version=0.1.4 mod_id=threadtweak mod_desc=Improve and tweak Minecraft CPU scheduling (again!) maven_group=com.github.getchoo # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api -mod_menu_version=10.0.0-beta.1 +mod_menu_version=11.0.1 diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..4026330 --- /dev/null +++ b/shell.nix @@ -0,0 +1,16 @@ +{ + pkgs ? import nixpkgs { + inherit system; + config = { }; + overlays = [ ]; + }, + lib ? pkgs.lib, + nixpkgs ? , + system ? builtins.currentSystem, +}: +pkgs.mkShellNoCC { + packages = [ + pkgs.jdk21_headless + pkgs.gradle_8 + ]; +} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 8ef3220..5423b32 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -23,7 +23,7 @@ "depends": { "fabricloader": ">=0.15", "fabric-api": "*", - "minecraft": "~1.20.5", + "minecraft": "~1.21", "java": ">=21" } }