generated from neoforged/MDK
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (61 loc) · 1.85 KB
/
variables-release.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release Variables
on:
workflow_call:
outputs:
mcVersion:
description: "Minecraft Version"
value: ${{ jobs.vars.outputs.mcVersion }}
neoVersion:
description: "Neoforge Version"
value: ${{ jobs.vars.outputs.neoVersion }}
modVersion:
description: "Mod Version"
value: ${{ jobs.vars.outputs.modVersion }}
jobs:
vars:
name: Get Variables
runs-on: ubuntu-latest
outputs:
mcVersion: ${{steps.minecraft.outputs.version}}
neoVersion: ${{steps.neoforge.outputs.version}}
modVersion: ${{steps.version.outputs.version}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 150
fetch-tags: true
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Version
id: version
uses: paulhatch/[email protected]
with:
change_path: "neoforge"
version_format: "${major}.${minor}.${patch}"
search_commit_body: true
- name: MC Version
id: minecraft
run: ./gradlew mcVersion -q >> "$GITHUB_OUTPUT"
env:
VERSION: ${{ steps.version.outputs.version }}
- name: NeoForge Version
id: neoforge
run: ./gradlew neoVersion -q >> "$GITHUB_OUTPUT"
env:
VERSION: ${{ steps.version.outputs.version }}
output:
name: Output
needs: [ vars ]
runs-on: ubuntu-latest
steps:
- name: Output
run: |
echo "Minecraft = ${{ needs.vars.outputs.mcVersion }}"
echo "Mod = ${{ needs.vars.outputs.modVersion }}"
echo "NeoForge = ${{ needs.vars.outputs.neoVersion }}"