Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
version: 2
updates:
- package-ecosystem: "gradle"
cooldown:
default-days: 7
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
cooldown:
default-days: 7
directory: "/"
schedule:
interval: "monthly"
23 changes: 0 additions & 23 deletions .github/workflows/build.yml

This file was deleted.

87 changes: 87 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Check for new Minecraft snapshot

on:
schedule:
- cron: '10 * * * *'
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
check:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # 6.1.0
with:
python-version: '3.14.x'

- name: Check for snapshot
run: pip install -r requirements.txt && python download_server.py

- name: Set up Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0

- name: Set up JDK 25
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
with:
distribution: 'temurin'
java-version: 25
check-latest: true

# Wooyeah
- name: Read last snapshot
id: last_snapshot
uses: juliangruber/read-file-action@b549046febe0fe86f8cb4f93c24e284433f9ab58 # 1.1.7
with:
path: ./last_snapshot.txt
- name: Read last release
id: last_release
uses: juliangruber/read-file-action@b549046febe0fe86f8cb4f93c24e284433f9ab58 # 1.1.7
with:
path: ./last_release.txt
- name: Read next release
id: next_release
uses: juliangruber/read-file-action@b549046febe0fe86f8cb4f93c24e284433f9ab58 # 1.1.7
with:
path: ./next_release.txt

- name: Compile MappingsGenerator jar
run: ./gradlew build && mv build/libs/MappingsGenerator-*.jar ./MappingsGenerator.jar
- name: Run MappingsGenerator
run: java -jar MappingsGenerator.jar server.jar ${STEPS_NEXT_RELEASE_OUTPUTS_CONTENT}
env:
STEPS_NEXT_RELEASE_OUTPUTS_CONTENT: ${{ steps.next_release.outputs.content }}
- name: Pack mappings
run: java -cp MappingsGenerator.jar com.viaversion.mappingsgenerator.MappingsOptimizer ${STEPS_LAST_RELEASE_OUTPUTS_CONTENT} ${STEPS_NEXT_RELEASE_OUTPUTS_CONTENT} --generateDiffStubs
env:
STEPS_LAST_RELEASE_OUTPUTS_CONTENT: ${{ steps.last_release.outputs.content }}
STEPS_NEXT_RELEASE_OUTPUTS_CONTENT: ${{ steps.next_release.outputs.content }}
- name: Pack backwards mappings
run: java -cp MappingsGenerator.jar com.viaversion.mappingsgenerator.MappingsOptimizer ${STEPS_NEXT_RELEASE_OUTPUTS_CONTENT} ${STEPS_LAST_RELEASE_OUTPUTS_CONTENT} --generateDiffStubs
env:
STEPS_NEXT_RELEASE_OUTPUTS_CONTENT: ${{ steps.next_release.outputs.content }}
STEPS_LAST_RELEASE_OUTPUTS_CONTENT: ${{ steps.last_release.outputs.content }}

- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "automation"
git add .
git commit -am "Update: ${STEPS_LAST_SNAPSHOT_OUTPUTS_CONTENT}"
env:
STEPS_LAST_SNAPSHOT_OUTPUTS_CONTENT: ${{ steps.last_snapshot.outputs.content }}

- name: Push changes
uses: ad-m/github-push-action@77c5b412c50b723d2a4fbc6d71fb5723bcd439aa # 1.0.0
with:
github_token: ${{ secrets.TOKEN }}
branch: ${{ github.ref }}
70 changes: 0 additions & 70 deletions .github/workflows/main.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test
on: [push, pull_request]
permissions:
contents: read

jobs:
test:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
with:
persist-credentials: false
- name: Set up Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0
- name: Set up JDK 25
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
with:
distribution: 'temurin'
java-version: 25
check-latest: true
- name: Build and test with Gradle
run: ./gradlew test