forked from BloomhouseMC/Besmirchment
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 2.02 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
name: Publish on GitHub, CurseForge & Modrinth
on: [ push, pull_request, workflow_dispatch ]
env:
MINECRAFT_VERSION: 1.20.1
JAVA_VERSION: 17
VERSION: 1.0.0+1.20.1
RELEASE_NAME: Besmirchment fork 1.0.0 for Minecraft 1.20.1
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_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 JDK 17
uses: actions/setup-java@v2
with:
distribution: "microsoft"
java-version: 17
cache: gradle
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew build
- name: Publish GitHub
uses: Kir-Antipov/[email protected]
with:
github-tag: "v${{env.VERSION}}"
github-token: "${{ secrets.MY_GITHUB_TOKEN }}"
name: "${{env.RELEASE_NAME}}"
version: "${{env.VERSION}}"
version-type: release
loaders: fabric
game-versions: "${{env.MINECRAFT_VERSION}}"
java: "${{env.JAVA_VERSION}}"