generated from natanfudge/fabric-example-mod-kotlin
-
-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (49 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
name: Publish
on:
workflow_dispatch:
inputs:
release-title:
description: 'Release Title'
required: false
mod-version:
description: 'Mod Version'
required: true
jobs:
build:
runs-on: ubuntu-latest
env:
NEXT_VERSION: ${{github.ref_name}}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Bump version
run: ./.github/scripts/bumpVersion.sh
env:
VERSION: ${{ inputs.mod-version }}
- name: Commit version bump
uses: EndBug/add-and-commit@v7
with:
add: ./gradle.properties
message: ${{ format('[CI] Bump version to {0}', inputs.mod-version) }}
branch: main
- name: Publish to GitHub
uses: elgohr/Github-Release-Action@v4
env:
GITHUB_TOKEN: ${{ github.token }}
with:
title: ${{ github.event.inputs.release-title }}
- name: Publish to CurseForge
run: |
chmod +x ./gradlew
./gradlew build curseforge --stacktrace
env:
ORG_GRADLE_PROJECT_curseforgeToken: ${{ secrets.CURSEFORGE_API_KEY }}
- name: Publish to Modrinth
run: |
chmod +x ./gradlew
./gradlew build modrinth --stacktrace
env:
ORG_GRADLE_PROJECT_modrinthToken: ${{ secrets.MODRINTH_API_KEY }}