-
Notifications
You must be signed in to change notification settings - Fork 40
129 lines (110 loc) · 3.48 KB
/
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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Publish BedrockIfy to CurseForge and Modrinth
on:
workflow_dispatch:
inputs:
curseforge:
description: 'Publish to Curseforge'
default: true
type: boolean
modrinth:
description: 'Publish to Modrinth'
default: true
type: boolean
github:
description: 'Publish to GitHub'
default: true
type: boolean
minecraftVersion:
description: 'Minecraft Version. Ex: [1.20.2,1.21)'
default: '[1.20.6,1.21]'
required: true
javaVersion:
description: 'Publish java version'
required: true
default: 21
type: number
modVersion:
required: true
default: '1.9.2+mc1.20.6'
description: 'Mod version string. Ex: 1.9.2+mc1.20.6'
type: string
releaseName:
required: true
default: '[1.20.6] Bedrockify 1.9.2'
description: 'Mod publish name. Ex: [1.20.6] Bedrockify 1.9.2'
type: string
env:
MINECRAFT_VERSION: ${{ inputs.minecraftVersion }}
JAVA_VERSION: ${{ inputs.javaVersion }}
VERSION: ${{ inputs.modVersion }}
RELEASE_NAME: ${{ inputs.releaseName }}
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Environment Variables
run: env
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "${{env.JAVA_VERSION}}"
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
run: ./gradlew clean build
- name: Publish (CurseForge)
if: ${{ inputs.curseforge }}
uses: Kir-Antipov/[email protected]
with:
curseforge-id: 403858
curseforge-token: "${{env.CURSEFORGE_TOKEN}}"
name: "${{env.RELEASE_NAME}}"
version: "${{env.VERSION}}"
version-type: release
changelog-file: changelog.md
dependencies: |
fabric-api(required)
loaders: "fabric"
game-versions: "${{env.MINECRAFT_VERSION}}"
java: "${{env.JAVA_VERSION}}"
- name: Publish (Modrinth)
if: ${{ inputs.modrinth }}
uses: Kir-Antipov/[email protected]
with:
modrinth-id: ox3rDp1B
modrinth-token: "${{env.MODRINTH_TOKEN}}"
modrinth-featured: true
name: "${{env.RELEASE_NAME}}"
version: "${{env.VERSION}}"
version-type: release
changelog-file: changelog.md
dependencies: |
fabric-api(required)
loaders: "$fabric"
game-versions: "${{env.MINECRAFT_VERSION}}"
java: "${{env.JAVA_VERSION}}"
- name: Publish (Github)
if: ${{ inputs.github }}
uses: Kir-Antipov/[email protected]
with:
github-token: "${{secrets.PUBLISH_GITHUB_TOKEN}}"
github-tag: "${{env.VERSION}}"
name: "${{env.RELEASE_NAME}}"
version: "${{env.VERSION}}"
version-type: release
changelog-file: changelog.md
dependencies: |
fabric-api(required)
loaders: "$fabric"
game-versions: "${{env.MINECRAFT_VERSION}}"
java: "${{env.JAVA_VERSION}}"