-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.43 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
name: Publish
on:
push:
tags:
- '1.18/*'
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Build
run: ./gradlew build
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: build/libs/
- name: Publish to Modrinth
run: ./gradlew publishModrinth
env:
MODRINTH: ${{ secrets.MODRINTH_TOKEN }}
- name: Publish to Curseforge
run: ./gradlew curseforge
env:
CURSEFORGE: ${{ secrets.CURSEFORGE_TOKEN }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: "./build/libs/*"
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ steps.get_version.outputs.VERSION }} for Minecraft 1.18.x
- name: Publish to Infernal Studios Maven
run: ./gradlew publish
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}