Skip to content

Commit 44420b3

Browse files
committed
Add PUBLISH.yml
1 parent 71f841e commit 44420b3

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/PUBLISH.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Publish on GitHub, Modrinth, CurseForge
2+
3+
on: [ workflow_dispatch ]
4+
5+
env:
6+
MINECRAFT_VERSION: 1.20.1
7+
JAVA_VERSION: 17
8+
VERSION: 0.2.2b
9+
VERSION_TYPE: release
10+
PUBLISH_GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
11+
PUBLISH_MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
12+
PUBLISH_CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check Environment Variables
22+
run: env
23+
24+
- name: Checkout Repository
25+
uses: actions/checkout@v3
26+
with:
27+
submodules: true
28+
29+
- name: Setup Java
30+
uses: actions/setup-java@v2
31+
with:
32+
distribution: "temurin"
33+
java-version: "${{env.JAVA_VERSION}}"
34+
35+
- name: Make Gradle Wrapper Executable
36+
if: ${{ runner.os != 'Windows' }}
37+
run: chmod +x ./gradlew
38+
39+
- name: Build
40+
run: ./gradlew clean build
41+
42+
- name: Publish
43+
uses: Kir-Antipov/mc-publish@v3.3
44+
with:
45+
github-tag: "v${{env.VERSION}}"
46+
github-generate-changelog: false
47+
github-draft: false
48+
github-prerelease: false
49+
github-token: "${{env.PUBLISH_GITHUB_TOKEN}}"
50+
51+
modrinth-id: QgrK9rtJ
52+
modrinth-featured: false
53+
modrinth-token: "${{env.PUBLISH_MODRINTH_TOKEN}}"
54+
55+
curseforge-id: 1000148
56+
curseforge-token: "${{env.PUBLISH_CURSEFORGE_TOKEN}}"
57+
58+
name: "Create: Addon Compatibility - v${{env.VERSION}} - ${{env.MINECRAFT_VERSION}} - (neo)forge"
59+
version: "${{env.VERSION}}"
60+
version-type: "${{env.VERSION_TYPE}}"
61+
changelog-file: LATEST_CHANGELOG.md
62+
game-version-filter: releases
63+
64+
loaders: |
65+
forge
66+
neoforge
67+
68+
files: "build/libs/createaddoncompatibility-${{env.VERSION}}.jar"

0 commit comments

Comments
 (0)