forked from LuckPerms/LuckPerms
-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (69 loc) · 2.69 KB
/
minestom-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
name: Publish Minestom support
on:
push:
branches:
- 'feat/minestom'
concurrency: "gradle-snapshot-${{ github.ref }}"
permissions:
contents: read
jobs:
publish:
name: "Publish"
runs-on: "ubuntu-latest"
environment:
name: "snapshot"
steps:
- name: "Checkout repository"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
submodules: true
- name: "Validate Gradle wrapper"
uses: gradle/actions/wrapper-validation@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
- name: "Setup JDK 21"
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
java-version: "21"
distribution: "temurin"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
with:
gradle-version: "wrapper"
- name: "Validate version"
run: |
VERSION="$(./gradlew properties | awk '/^version:/ { print $2; }')"
if ! echo "$VERSION" | grep -q 'SNAPSHOT'; then
echo "Release version detected, refusing to publish..."
exit 1
fi
echo "Snapshot version detected"
- name: "Publish artifacts"
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_signingKeyId: "${{ secrets.SIGNING_KEY_ID }}"
ORG_GRADLE_PROJECT_signingKey: "${{ secrets.SIGNING_KEY }}"
ORG_GRADLE_PROJECT_signingPassword: "${{ secrets.SIGNING_PASSWORD }}"
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
ORG_GRADLE_PROJECT_hyperaSnapshotsUsername: "${{ secrets.HYPERA_SNAPSHOTS_USERNAME }}"
ORG_GRADLE_PROJECT_hyperaSnapshotsPassword: "${{ secrets.HYPERA_SNAPSHOTS_PASSWORD }}"
dependency-graph:
name: "Dependency Graph"
runs-on: "ubuntu-latest"
permissions:
contents: write
steps:
- name: "Checkout repository"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
submodules: true
- name: "Setup JDK 21"
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
java-version: "21"
distribution: "temurin"
- name: "Validate Gradle wrapper"
uses: gradle/actions/wrapper-validation@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
- name: "Generate and submit dependency graph"
uses: gradle/actions/dependency-submission@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0