Skip to content

Commit 0c9646d

Browse files
authored
Merge branch 'version/26.1' into mergify/configuration-deprecated-update
2 parents 8563080 + 5fc551a commit 0c9646d

1 file changed

Lines changed: 7 additions & 88 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,15 @@
1-
name: Publish to Maven & Create GitHub Release
1+
name: Publish
22

33
on:
44
push:
55
branches:
6-
- 'version/*'
6+
- version/*
77
workflow_dispatch:
88

9-
env:
10-
SLNE_RELEASES_REPO_USERNAME: ${{ secrets.SLNE_RELEASES_REPO_USERNAME }}
11-
SLNE_RELEASES_REPO_PASSWORD: ${{ secrets.SLNE_RELEASES_REPO_PASSWORD }}
12-
MODULE_REGEX: "surf-api-paper-server.*-all\\.jar$|surf-api-velocity-server.*-all\\.jar$|surf-api-standalone-server.*-all\\.jar$"
13-
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
14-
159
jobs:
1610
build:
17-
runs-on: self-hosted
18-
steps:
19-
- name: Collect Workflow Telemetry
20-
uses: catchpoint/workflow-telemetry-action@v2
21-
22-
- name: Checkout Repository
23-
uses: actions/checkout@v5
24-
with:
25-
fetch-depth: 0
26-
27-
- name: Setup JDK
28-
uses: actions/setup-java@v5
29-
with:
30-
distribution: 'graalvm'
31-
java-version: '25'
32-
33-
- name: Setup Gradle
34-
uses: gradle/actions/setup-gradle@v5
35-
36-
- name: Build all modules with Gradle
37-
run: ./gradlew build shadowJar --parallel --no-scan
38-
39-
- name: Check all modules with Gradle
40-
run: ./gradlew check checkKotlinAbi --parallel --no-scan
41-
42-
- name: Publish all modules to Maven
43-
run: ./gradlew publish --parallel --no-scan
44-
45-
- name: Extract Project Version and Snapshot Flag from Gradle
46-
id: get_version
47-
run: |
48-
VERSION=$(./gradlew properties --no-daemon \
49-
| grep '^version:' \
50-
| awk '{print $2}')
51-
SNAPSHOT_FLAG=$(./gradlew properties --no-daemon \
52-
| grep '^snapshot:' \
53-
| awk '{print $2}')
54-
if [ "$SNAPSHOT_FLAG" = "true" ]; then
55-
VERSION="${VERSION}-SNAPSHOT"
56-
fi
57-
echo "VERSION=$VERSION" >> $GITHUB_ENV
58-
echo "SNAPSHOT_FLAG=$SNAPSHOT_FLAG" >> $GITHUB_ENV
59-
60-
- name: Determine release flags
61-
run: |
62-
CURRENT_BRANCH=${GITHUB_REF#refs/heads/}
63-
# prerelease only for snapshots
64-
if [ "${SNAPSHOT_FLAG}" = "true" ]; then
65-
echo "PRERELEASE=true" >> $GITHUB_ENV
66-
else
67-
echo "PRERELEASE=false" >> $GITHUB_ENV
68-
fi
69-
# make_latest false for snapshots or non-default branches
70-
if [ "${SNAPSHOT_FLAG}" = "true" ] || [ "${CURRENT_BRANCH}" != "${DEFAULT_BRANCH}" ]; then
71-
echo "MAKE_LATEST=false" >> $GITHUB_ENV
72-
else
73-
echo "MAKE_LATEST=true" >> $GITHUB_ENV
74-
fi
75-
76-
- name: Find and filter JAR files
77-
id: find_jars
78-
run: |
79-
echo "JAR_FILES<<EOF" >> $GITHUB_ENV
80-
find . -path "**/build/libs/*.jar" \
81-
| grep -E "${{ env.MODULE_REGEX }}" \
82-
>> $GITHUB_ENV
83-
echo "EOF" >> $GITHUB_ENV
84-
85-
- name: Create GitHub Release
86-
uses: softprops/action-gh-release@v2
87-
with:
88-
tag_name: v${{ env.VERSION }}
89-
name: Release ${{ env.VERSION }}
90-
draft: false
91-
prerelease: ${{ env.PRERELEASE }}
92-
make_latest: ${{ env.MAKE_LATEST }}
93-
files: ${{ env.JAR_FILES }}
94-
generate_release_notes: true
95-
env:
96-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
uses: SLNE-Development/surf-workflows/.github/workflows/build-publish-release-gradle.yml@master
12+
with:
13+
modules: "surf-api-paper-server-*-all.jar;surf-api-velocity-server-*-all.jar;surf-api-standalone-server-*-all.jar"
14+
check-kotlin-abi: true
15+
secrets: inherit

0 commit comments

Comments
 (0)