-
-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (43 loc) · 1.61 KB
/
check-and-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 }}