mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2026-11-30 09:44:23 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97ee43e434 |
No files matched your search
@@ -1,4 +1,4 @@
|
|||||||
name: Release Maven version
|
name: Release BetterRTP Maven version
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [online-editor]
|
branches: [online-editor]
|
||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
cache: maven
|
cache: maven
|
||||||
- name: Read Maven versions
|
- name: Read BetterRTP Maven version
|
||||||
id: version
|
id: version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -30,13 +30,8 @@ jobs:
|
|||||||
[[ "$version0" =~ ^[0-9][A-Za-z0-9._-]*$ ]] || { echo "Invalid Maven version"; exit 1; }
|
[[ "$version0" =~ ^[0-9][A-Za-z0-9._-]*$ ]] || { echo "Invalid Maven version"; exit 1; }
|
||||||
[[ "$version0" != *SNAPSHOT* ]] || { echo "Snapshot versions are not released"; exit 1; }
|
[[ "$version0" != *SNAPSHOT* ]] || { echo "Snapshot versions are not released"; exit 1; }
|
||||||
echo "version0=$version0" >> "$GITHUB_OUTPUT"
|
echo "version0=$version0" >> "$GITHUB_OUTPUT"
|
||||||
mvn -B -q -f BetterRTPAddons/pom.xml help:evaluate -Dexpression=project.version -Doutput="$RUNNER_TEMP/version-1"
|
echo "tag=v$version0" >> "$GITHUB_OUTPUT"
|
||||||
version1=$(cat "$RUNNER_TEMP/version-1")
|
echo "title=BetterRTP $version0" >> "$GITHUB_OUTPUT"
|
||||||
[[ "$version1" =~ ^[0-9][A-Za-z0-9._-]*$ ]] || { echo "Invalid Maven version"; exit 1; }
|
|
||||||
[[ "$version1" != *SNAPSHOT* ]] || { echo "Snapshot versions are not released"; exit 1; }
|
|
||||||
echo "version1=$version1" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "tag=v$version0-addons-$version1" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "title=BetterRTP $version0 / BetterRTPAddons $version1" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Check for an existing release
|
- name: Check for an existing release
|
||||||
id: existing
|
id: existing
|
||||||
env:
|
env:
|
||||||
@@ -53,16 +48,16 @@ jobs:
|
|||||||
- name: Build and test
|
- name: Build and test
|
||||||
if: steps.existing.outputs.exists != 'true'
|
if: steps.existing.outputs.exists != 'true'
|
||||||
run: |
|
run: |
|
||||||
mvn -B clean verify
|
mvn -B -pl :BetterRTP clean verify
|
||||||
mvn -B -f tests/editor/pom.xml verify
|
mvn -B -f tests/editor/pom.xml verify
|
||||||
- name: Prepare JARs and schemas
|
- name: Prepare BetterRTP JAR and editor schemas
|
||||||
if: steps.existing.outputs.exists != 'true'
|
if: steps.existing.outputs.exists != 'true'
|
||||||
env:
|
env:
|
||||||
|
# The website still needs Addons field metadata; this does not build its JAR.
|
||||||
SCHEMA_PATHS: BetterRTP-Core/src/main/resources/META-INF/editor-schema.json BetterRTPAddons/src/main/resources/META-INF/editor-schema.json
|
SCHEMA_PATHS: BetterRTP-Core/src/main/resources/META-INF/editor-schema.json BetterRTPAddons/src/main/resources/META-INF/editor-schema.json
|
||||||
run: |
|
run: |
|
||||||
mkdir release-assets
|
mkdir release-assets
|
||||||
cp "dist/BetterRTP-${{ steps.version.outputs.version0 }}.jar" release-assets/
|
cp "dist/BetterRTP-${{ steps.version.outputs.version0 }}.jar" release-assets/
|
||||||
cp "dist/BetterRTPAddons-${{ steps.version.outputs.version1 }}.jar" release-assets/
|
|
||||||
python3 - <<'PYTHON'
|
python3 - <<'PYTHON'
|
||||||
import json, os, pathlib, re
|
import json, os, pathlib, re
|
||||||
for path in os.environ['SCHEMA_PATHS'].split():
|
for path in os.environ['SCHEMA_PATHS'].split():
|
||||||
|
|||||||
@@ -18,4 +18,4 @@ jobs:
|
|||||||
run: cp settings.xml $HOME/.m2/settings.xml
|
run: cp settings.xml $HOME/.m2/settings.xml
|
||||||
|
|
||||||
- name: Build and test with Maven
|
- name: Build and test with Maven
|
||||||
run: mvn test
|
run: mvn -B -pl :BetterRTP test
|
||||||
@@ -90,12 +90,18 @@ Use the website's schema-version database migrations before deploying these clie
|
|||||||
### Automatic Maven releases
|
### Automatic Maven releases
|
||||||
|
|
||||||
`.github/workflows/release.yml` runs on pushes to `online-editor` (or manually from
|
`.github/workflows/release.yml` runs on pushes to `online-editor` (or manually from
|
||||||
that branch). It reads the effective Maven project versions, builds the plugin JARs,
|
that branch). It reads only the Core POM version, builds and verifies BetterRTP Core,
|
||||||
runs the editor tests, and publishes a stable GitHub release with the JARs and schemas
|
runs the editor tests, and publishes a stable GitHub release with exactly one plugin
|
||||||
attached together. For the current POMs the title is `BetterRTP 3.6.13 / BetterRTPAddons 1.8.10` and the tag is
|
JAR. For the current Core POM the title is `BetterRTP 3.6.13` and the tag is `v3.6.13`.
|
||||||
`v3.6.13-addons-1.8.10`. BetterRTP includes both module versions so an Addons-only version bump
|
This single-JAR release is compatible with the website's GitHub release importer.
|
||||||
can produce a new release containing both schemas.
|
|
||||||
|
|
||||||
An existing release is left untouched. Bump the owning plugin's POM version to publish
|
Both Core and Addons editor-schema JSON files remain attached for the website editor.
|
||||||
again; SNAPSHOT versions are rejected. GitHub's built-in token needs Contents write
|
Copying Addons metadata does not compile or publish its plugin binary. GitHub's Maven
|
||||||
|
test workflow also selects Core only. Build and upload the Addons plugin manually;
|
||||||
|
do not attach its JAR to the automated BetterRTP release, which must contain one JAR.
|
||||||
|
Local root Maven builds still build both modules.
|
||||||
|
|
||||||
|
An existing release is left untouched. Bump `BetterRTP-Core/pom.xml` to publish the next
|
||||||
|
Core release. An Addons-only version bump does not create a new Core release.
|
||||||
|
SNAPSHOT versions are rejected. GitHub's built-in token needs Contents write
|
||||||
permission, which the workflow declares. No extra publishing token is required.
|
permission, which the workflow declares. No extra publishing token is required.
|
||||||
Reference in new issue
Block a user