-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (77 loc) · 2.49 KB
/
deploy.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
name: deploy
run-name: Deploying the mod...
on:
workflow_dispatch:
inputs:
version:
description: "Version Title"
required: true
type:
type: choice
description: "Release Type"
options:
- release
- beta
- alpha
required: false
default: "release"
deps:
description: "Dependencies"
required: false
default: ""
assets:
type: boolean
description: "Generate assets"
required: false
default: false
publish:
type: boolean
description: "Publish to curseforge and modrinth"
required: false
default: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rm -rf src/generated
if: github.event.inputs.assets == 'true'
- run: ./gradlew runData
if: github.event.inputs.assets == 'true'
continue-on-error: true
- run: VERSION="${{ github.event.inputs.version }}" ./gradlew build
- run: |
echo "DEPS<<EOF" >> $GITHUB_ENV
echo "${{ github.event.inputs.deps }}" | sed "s/,/\n/g" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- run: echo "FILE=$(ls -d build/libs/*)" >> $GITHUB_ENV
- run: echo "FILENAME=$(cd build/libs; ls *)" >> $GITHUB_ENV
- run: cd ../../
- uses: Kir-Antipov/[email protected]
if: github.event.inputs.publish == 'true'
with:
name: ${{ env.FILENAME }}
version: ${{ github.event.inputs.version }}
version-type: ${{ github.event.inputs.type }}
loaders: "forge"
game-versions: "1.16.5"
dependencies: ${{ env.DEPS }}
java: "8"
modrinth-id: "Lddihzs4"
modrinth-token: ${{ secrets.MODRINTH_API_TOKEN }}
curseforge-id: 813035
curseforge-token: ${{ secrets.CF_API_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-tag: ${{ github.event.inputs.version }}
- uses: Kir-Antipov/[email protected]
if: github.event.inputs.publish == 'false'
with:
name: ${{ env.FILENAME }}
version: ${{ github.event.inputs.version }}
version-type: ${{ github.event.inputs.type }}
loaders: "forge"
game-versions: "1.16.5"
dependencies: ${{ env.DEPS }}
java: "8"
github-token: ${{ secrets.GITHUB_TOKEN }}
github-tag: ${{ github.event.inputs.version }}