Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2add41f69 | ||
|
|
254295311b |
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
@@ -104,15 +104,7 @@ jobs:
|
|||||||
INPUT_SUFFIX: ${{ steps.meta.outputs.suffix }}
|
INPUT_SUFFIX: ${{ steps.meta.outputs.suffix }}
|
||||||
run: |
|
run: |
|
||||||
BRANCH="${{ github.ref_name }}"
|
BRANCH="${{ github.ref_name }}"
|
||||||
|
GITEA_API="${GITEA_URL}/api/v1/repos/${{ github.repository }}"
|
||||||
# Skip auto-bump on main — version is already set before merge
|
|
||||||
if [ "$BRANCH" = "main" ]; then
|
|
||||||
CURRENT=$(sed -n 's/.*VERSION:[[:space:]]*\([0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\).*/\1/p' README.md 2>/dev/null | head -1)
|
|
||||||
echo "On main — using current version ${CURRENT} (no bump)"
|
|
||||||
echo "version=${CURRENT}" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "zip_name=${EXT_ELEMENT}-${CURRENT}${INPUT_SUFFIX}.zip" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Read current version from README.md
|
# Read current version from README.md
|
||||||
CURRENT=$(sed -n 's/.*VERSION:[[:space:]]*\([0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\).*/\1/p' README.md 2>/dev/null | head -1)
|
CURRENT=$(sed -n 's/.*VERSION:[[:space:]]*\([0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\).*/\1/p' README.md 2>/dev/null | head -1)
|
||||||
@@ -163,7 +155,7 @@ jobs:
|
|||||||
PYEOF
|
PYEOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Commit bump
|
# Commit bump to current branch
|
||||||
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
|
||||||
git config --local user.name "gitea-actions[bot]"
|
git config --local user.name "gitea-actions[bot]"
|
||||||
git remote set-url origin "https://jmiller:${GA_TOKEN}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
git remote set-url origin "https://jmiller:${GA_TOKEN}@git.mokoconsulting.tech/${{ github.repository }}.git"
|
||||||
@@ -174,6 +166,21 @@ jobs:
|
|||||||
git push
|
git push
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# For stable releases from dev: merge dev → main via Gitea API
|
||||||
|
if [ "$INPUT_STABILITY" = "stable" ] && [ "$BRANCH" != "main" ]; then
|
||||||
|
echo "Merging ${BRANCH} → main via Gitea API..."
|
||||||
|
MERGE_RESULT=$(curl -sf -X POST -H "Authorization: token ${GA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
"${GITEA_API}/merges" \
|
||||||
|
-d "$(jq -n \
|
||||||
|
--arg base "main" \
|
||||||
|
--arg head "${BRANCH}" \
|
||||||
|
--arg msg "chore(release): merge ${BRANCH} for stable ${NEW_VERSION} [skip ci]" \
|
||||||
|
'{base: $base, head: $head, merge_message_field: $msg}'
|
||||||
|
)" 2>&1) || true
|
||||||
|
echo "Merge result: ${MERGE_RESULT}"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
|
echo "version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
|
||||||
echo "zip_name=${EXT_ELEMENT}-${NEW_VERSION}${INPUT_SUFFIX}.zip" >> "$GITHUB_OUTPUT"
|
echo "zip_name=${EXT_ELEMENT}-${NEW_VERSION}${INPUT_SUFFIX}.zip" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
INGROUP: MokoCassiopeia.Documentation
|
INGROUP: MokoCassiopeia.Documentation
|
||||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia
|
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia
|
||||||
FILE: ./README.md
|
FILE: ./README.md
|
||||||
VERSION: 03.10.22
|
VERSION: 03.10.23
|
||||||
BRIEF: Documentation for MokoCassiopeia template
|
BRIEF: Documentation for MokoCassiopeia template
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</server>
|
</server>
|
||||||
</updateservers>
|
</updateservers>
|
||||||
<name>MokoCassiopeia</name>
|
<name>MokoCassiopeia</name>
|
||||||
<version>03.10.22</version>
|
<version>03.10.23</version>
|
||||||
<scriptfile>script.php</scriptfile>
|
<scriptfile>script.php</scriptfile>
|
||||||
<creationDate>2026-04-19</creationDate>
|
<creationDate>2026-04-19</creationDate>
|
||||||
<author>Jonathan Miller || Moko Consulting</author>
|
<author>Jonathan Miller || Moko Consulting</author>
|
||||||
|
|||||||
Reference in New Issue
Block a user