Skip to content

Check the manifest and update hashed if needed #72477

Check the manifest and update hashed if needed

Check the manifest and update hashed if needed #72477

name: "Check the manifest and update hashed if needed"
on:
workflow_dispatch:
schedule:
- cron: '5/10 * * * *'
jobs:
check-updates:
runs-on: ubuntu-latest
outputs:
id: ${{ steps.check.outputs.id }}
url: ${{ steps.check.outputs.url }}
steps:
- name: 'Check Minecraft updates'
uses: IotaBread/minecraft-update-check-action@v0
id: check
with:
cache-base-key: mc-manifest- # Cache keys will be like mc-manifest-1609470000
version-manifest-url: https://piston-meta.mojang.com/mc/game/version_manifest_v2.json
generate-and-publish:
needs: check-updates
if: ${{ needs.check-updates.outputs.id != '' }}
name: Generate and publish for Minecraft ${{ needs.check-updates.outputs.id }}
runs-on: ubuntu-latest
container:
image: openjdk:16-jdk
options: --user root
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Generate and publish mappings
run: ./gradlew publish -PversionJsonUrl="${{ needs.check-updates.outputs.url }}" -PminecraftVersion="${{ needs.check-updates.outputs.id }}" --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Update Quilt Meta
uses: quiltmc/update-quilt-meta@main
with:
b2-key-id: ${{ secrets.META_B2_KEY_ID }}
b2-key: ${{ secrets.META_B2_KEY }}
cf-key: ${{ secrets.META_CF_KEY }}