This repository has been archived by the owner on Oct 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 37
109 lines (105 loc) · 3.24 KB
/
ci.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Builds, tests the project with Gradle and uploads to Modrinth
name: Java CI
on:
push:
branches: [ "master" ]
paths-ignore:
- 'docs/**'
- 'workflows/**'
- 'README.md'
permissions:
contents: read
checks: write
env:
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/jep/
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 16
uses: actions/setup-java@v3
with:
java-version: '16'
distribution: 'temurin'
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10.8'
- name: Install Python dependencies
shell: bash
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install jep
python -m pip install alt-profanity-check
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build test publish
env:
SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Query Version
run: |
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
id: fetch-version
- name: Get Version
run: |
echo "version_name=${{steps.fetch-version.outputs.VERSION_NAME}}" >> $GITHUB_ENV
- name: Upload to Modrinth & Hangar
uses: WiIIiam278/mc-publish@hangar
with:
modrinth-id: SSXTD3me
modrinth-featured: false
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
hangar-id: William278/HuskChat
hangar-token: ${{ secrets.HANGAR_API_KEY }}
files-primary: target/HuskChat-Plugin-*.jar
name: HuskChat v${{ env.version_name }}
version: ${{ env.version_name }}
changelog: ${{ github.event.head_commit.message }}
hangar-version-type: Alpha
modrinth-version-type: alpha
game-versions: |
1.16
1.16.1
1.16.2
1.16.3
1.16.4
1.16.5
1.17
1.17.1
1.18
1.18.1
1.18.2
1.19
1.19.1
1.19.2
1.19.3
1.19.4
1.20
1.20.1
1.20.2
modrinth-dependencies: |
unsignedvelocity | suggests | *
signedvelocity | suggests | *
papiproxybridge | suggests | *
placeholderapi | suggests | *
loaders: |
bungeecord
velocity
spigot
paper
folia
java: 16
- name: Upload GitHub Artifact
if: success() || failure()
uses: actions/upload-artifact@v2
with:
name: HuskChat Plugin
path: target/HuskChat-Plugin-*.jar