Skip to content

Commit

Permalink
Start of proper multi-loader structure for DataAttributes
Browse files Browse the repository at this point in the history
  • Loading branch information
bibi-reden committed Aug 2, 2024
1 parent 56426b8 commit f5ec407
Show file tree
Hide file tree
Showing 85 changed files with 1,432 additions and 3,491 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Audit - Build
on: [pull_request]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [17]
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- 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 the latest java on one OS
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: build/libs/
80 changes: 0 additions & 80 deletions .github/workflows/build-and-deploy.yml

This file was deleted.

138 changes: 138 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Deployment (J17)
on:
push:
branches-ignore:
- master
- "**-dev"
- "**-dev**"
- dev

jobs:
build-and-deploy:
env:
BRANCH_PREFIX: $(cat gradle.properties | grep mod_version | cut -d'+' -f2)
strategy:
matrix:
java: [17]
runs-on: ubuntu-latest
steps:
- name: check environment variables
run: env
- name: checkout repository
uses: actions/checkout@v3
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
run: ./gradlew build
- name: capture build artifacts (forge)
if: |
${{ matrix.java == '17' }}
github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
uses: actions/upload-artifact@v3
with:
name: Artifacts (Forge)
path: forge/build/libs/
- name: capture build artifacts (fabric)
if: |
${{ matrix.java == '17' }}
github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
uses: actions/upload-artifact@v3
with:
name: Artifacts (Fabric)
path: fabric/build/libs/
- name: get mod version
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
id: mod_version
run: |
archived_name=$(grep "archives_base_name" gradle.properties | cut -d'=' -f2 | tr -d '\n')
mod_version_val=$(grep "mod_version" gradle.properties | cut -d'=' -f2 | tr -d '\n')
commitish_val=$(grep "mod_version" gradle.properties | cut -d'=' -f2 | cut -d'-' -f1 | tr -d '\n')
echo "archive_name=$archived_name" >> $GITHUB_OUTPUT
echo "mod_version=$mod_version_val" >> $GITHUB_OUTPUT
echo "commitish=$commitish_val/main" >> $GITHUB_OUTPUT
- name: get minecraft version
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
id: minecraft_version
run: |
minecraft_version_val=$(grep "minecraft_version" gradle.properties | cut -d'=' -f2 | tr -d '\n')
echo "minecraft_version=$minecraft_version_val" >> $GITHUB_OUTPUT
- name: deploy fabric! (mc-publish)
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
uses: Kir-Antipov/[email protected]
with:
name: ${{ steps.mod_version.outputs.mod_version }}
files: |
fabric/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
fabric/build/libs/*-@(dev|sources|javadoc|shadow).jar
github-files: |
fabric/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
fabric/build/libs/*-@(dev|sources|javadoc|shadow).jar
modrinth-id: oLPaySSb
curseforge-id: 1019391

curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

github-tag: ${{ steps.mod_version.outputs.mod_version }}
github-token: ${{ secrets.REPOSITORY_TOKEN }}
github-commitish: ${{ steps.commitish.outputs.commitish }}

version: ${{ steps.mod_version.outputs.mod_version }}-fabric
changelog-file: CHANGELOG.md

loaders: |
fabric
quilt
dependencies: |
[email protected]+1.20.1(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github)
[email protected]+kotlin.1.8.22(required){modrinth:Ha28R6CL}{curseforge:308769}#(ignore:github)
game-versions: "${{ steps.minecraft_version.outputs.minecraft_version }}"
java: "${{ matrix.java }}"

- name: deploy forge! (mc-publish)
if: github.ref == 'refs/heads/${{ env.BRANCH_PREFIX }}'
uses: Kir-Antipov/[email protected]
with:
name: ${{ steps.mod_version.outputs.mod_version }}

files: |
forge/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
forge/build/libs/*-@(dev|sources|javadoc|shadow).jar
github-files: |
forge/build/libs/!(*-@(dev|sources|javadoc|shadow)).jar
forge/build/libs/*-@(dev|sources|javadoc|shadow).jar
modrinth-id: oLPaySSb
curseforge-id: 1019391

curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
modrinth-token: "${{ secrets.MODRINTH_TOKEN }}"

github-tag: ${{ steps.mod_version.outputs.mod_version }}
github-token: ${{ secrets.REPOSITORY_TOKEN }}
github-commitish: ${{ steps.commitish.outputs.commitish }}

version: ${{ steps.mod_version.outputs.mod_version }}-forge
changelog-file: CHANGELOG.md

loaders: |
forge
neoforge
dependencies: |
[email protected](required){modrinth:ordsPcFz}{curseforge:351264}#(ignore:github)
game-versions: "${{ steps.minecraft_version.outputs.minecraft_version }}"
java: "${{ matrix.java }}"
40 changes: 13 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
# gradle

.gradle/
build/
out/
classes/

# eclipse

*.launch

# idea

.idea/
*.iml
*.ipr
run/
*.iws

# vscode

.settings/
.vscode/
out/
*.iml
.gradle/
output/
bin/
libs/

.classpath
.project

# macos

*.DS_Store

# fabric

run/
.idea/
classes/
.metadata
.vscode
.settings
*.launch
Loading

0 comments on commit f5ec407

Please sign in to comment.