-
Notifications
You must be signed in to change notification settings - Fork 180
89 lines (77 loc) · 2.48 KB
/
auto-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
name: Auto Publish, Releasing
on:
workflow_dispatch:
inputs:
releaseType:
description: 'release type'
required: true
type: choice
default: 'beta'
options:
- 'release'
- 'beta'
- 'alpha'
publishMaven:
description: 'whether publish to the maven'
required: true
type: boolean
default: true
publishCurseForgeAndModrinth:
description: 'whether to publish to curseforge and modrinth'
required: true
type: boolean
default: true
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Build
uses: ./.github/actions/build_setup
- name: Build
run: ./gradlew build --build-cache
- if: ${{ inputs.publishMaven }}
name: Publish to Maven
run: ./gradlew publish --build-cache
- if: ${{ inputs.publishCurseForgeAndModrinth }}
name: Get Version
id: var
run: echo "version=$(./gradlew -q printVersion)" >> $GITHUB_OUTPUT
- if: ${{ inputs.publishCurseForgeAndModrinth }}
name: mc-publish-forge
uses: Kir-Antipov/[email protected]
with:
github-tag: ${{ steps.var.outputs.version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# Only include this section if you wish to publish
# your assets on Modrinth.
modrinth-id: 7tG215v7
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
# Only include this section if you wish to publish
# your assets on CurseForge.
curseforge-id: 890405
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
files: |
build/libs/!(*-@(dev|dev-all|dev-slim|sources|javadoc|dev-shadow|slim)).jar
build/libs/*-@(dev|sources|javadoc|dev-shadow|slim).jar
name: GregTechCEu ${{ steps.var.outputs.version }}
version: mc${{ steps.var.outputs.version }}
version-type: ${{ inputs.releaseType }}
changelog-file: RELEASE.*
loaders: |
forge
game-versions: |
${{ github.ref_name }}
game-version-filter: none
java: |
17
retry-attempts: 2
retry-delay: 10000
fail-mode: fail