Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8184dee9fe | ||
|
|
9f26449863 | ||
|
|
ae7c2bdc83 | ||
|
|
5d01605df3 | ||
|
|
84abaf8914 | ||
|
|
f4682689d6 |
@@ -59,6 +59,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
GITEA_API: ${{ vars.GITEA_API_URL }}
|
GITEA_API: ${{ vars.GITEA_API_URL }}
|
||||||
|
GITEA_SERVER_URL: ${{ vars.GITEA_SERVER_URL }}
|
||||||
|
GITHUB_SERVER_URL: ${{ github.server_url }}
|
||||||
run: |
|
run: |
|
||||||
TAG=$(git describe --tags --exact-match 2>/dev/null || true)
|
TAG=$(git describe --tags --exact-match 2>/dev/null || true)
|
||||||
if [ -z "$TAG" ]; then
|
if [ -z "$TAG" ]; then
|
||||||
@@ -66,8 +68,14 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ -z "$GITEA_API" ]; then
|
if [ -z "$GITEA_API" ]; then
|
||||||
echo "GITEA_API_URL is not set in repo variables."
|
if [ -n "$GITEA_SERVER_URL" ]; then
|
||||||
exit 1
|
GITEA_API="${GITEA_SERVER_URL}/api/v1"
|
||||||
|
elif [ -n "$GITHUB_SERVER_URL" ]; then
|
||||||
|
GITEA_API="${GITHUB_SERVER_URL}/api/v1"
|
||||||
|
else
|
||||||
|
echo "GITEA_API_URL is not set and server URL is unavailable."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
VERSION=${TAG#v}
|
VERSION=${TAG#v}
|
||||||
JAR_PATH=$(ls build/libs/*.jar | head -n 1)
|
JAR_PATH=$(ls build/libs/*.jar | head -n 1)
|
||||||
|
|||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"branches": ["main"],
|
||||||
|
"tagFormat": "v${version}",
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"releaseRules": [
|
||||||
|
{ "type": "chore", "scope": "deps", "release": "patch" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"prepareCmd": "node -e \"const fs=require('fs');fs.writeFileSync('gradle.properties', 'version=' + process.env.RELEASE_VERSION + '\\n');\""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": ["gradle.properties"],
|
||||||
|
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
branches: ["main"],
|
|
||||||
tagFormat: "v${version}",
|
|
||||||
plugins: [
|
|
||||||
"@semantic-release/commit-analyzer",
|
|
||||||
"@semantic-release/release-notes-generator",
|
|
||||||
[
|
|
||||||
"@semantic-release/exec",
|
|
||||||
{
|
|
||||||
prepareCmd:
|
|
||||||
"node -e \"const fs=require('fs');fs.writeFileSync('gradle.properties', 'version=' + process.env.RELEASE_VERSION + '\\n');\"",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"@semantic-release/git",
|
|
||||||
{
|
|
||||||
assets: ["gradle.properties"],
|
|
||||||
message:
|
|
||||||
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -73,6 +73,7 @@ The Gitea workflow expects these secrets/variables:
|
|||||||
|
|
||||||
- `GITEA_TOKEN`: built-in Actions token with repo write access for tags/releases.
|
- `GITEA_TOKEN`: built-in Actions token with repo write access for tags/releases.
|
||||||
- `GITEA_API_URL`: API base URL, for example `https://git.garvis.dev/api/v1`.
|
- `GITEA_API_URL`: API base URL, for example `https://git.garvis.dev/api/v1`.
|
||||||
|
- Optional fallback: `GITEA_SERVER_URL` or the runner `GITHUB_SERVER_URL` are used if the API URL is not set.
|
||||||
|
|
||||||
## Metrics
|
## Metrics
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ tasks.withType<JavaCompile>().configureEach {
|
|||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.jar {
|
||||||
|
archiveFileName.set("prometheus-spigot-${project.version}.jar")
|
||||||
|
}
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
filteringCharset = "UTF-8"
|
filteringCharset = "UTF-8"
|
||||||
filesMatching("plugin.yml") {
|
filesMatching("plugin.yml") {
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user