Migrate auto-release workflow to MokoStandards-API [skip ci]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
12
.github/workflows/auto-release.yml
vendored
12
.github/workflows/auto-release.yml
vendored
@@ -70,16 +70,16 @@ jobs:
|
|||||||
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_TOKEN || github.token }}"}}'
|
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_TOKEN || github.token }}"}}'
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 --branch version/04 --quiet \
|
git clone --depth 1 --branch version/04 --quiet \
|
||||||
"https://x-access-token:${GH_TOKEN}@git.mokoconsulting.tech/MokoConsulting/MokoStandards.git" \
|
"https://x-access-token:${GH_TOKEN}@git.mokoconsulting.tech/MokoConsulting/MokoStandards-API.git" \
|
||||||
/tmp/mokostandards
|
/tmp/mokostandards-api
|
||||||
cd /tmp/mokostandards
|
cd /tmp/mokostandards-api
|
||||||
composer install --no-dev --no-interaction --quiet
|
composer install --no-dev --no-interaction --quiet
|
||||||
|
|
||||||
# -- STEP 1: Read version -----------------------------------------------
|
# -- STEP 1: Read version -----------------------------------------------
|
||||||
- name: "Step 1: Read version from README.md"
|
- name: "Step 1: Read version from README.md"
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(php /tmp/mokostandards/api/cli/version_read.php --path . 2>/dev/null)
|
VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null)
|
||||||
if [ -z "$VERSION" ]; then
|
if [ -z "$VERSION" ]; then
|
||||||
echo "No VERSION in README.md — skipping release"
|
echo "No VERSION in README.md — skipping release"
|
||||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
@@ -243,7 +243,7 @@ jobs:
|
|||||||
steps.check.outputs.already_released != 'true'
|
steps.check.outputs.already_released != 'true'
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ steps.version.outputs.version }}"
|
VERSION="${{ steps.version.outputs.version }}"
|
||||||
php /tmp/mokostandards/api/cli/version_set_platform.php \
|
php /tmp/mokostandards-api/cli/version_set_platform.php \
|
||||||
--path . --version "$VERSION" --branch main
|
--path . --version "$VERSION" --branch main
|
||||||
|
|
||||||
# -- STEP 4: Update version badges ----------------------------------------
|
# -- STEP 4: Update version badges ----------------------------------------
|
||||||
@@ -422,7 +422,7 @@ jobs:
|
|||||||
BRANCH="${{ steps.version.outputs.branch }}"
|
BRANCH="${{ steps.version.outputs.branch }}"
|
||||||
MAJOR="${{ steps.version.outputs.major }}"
|
MAJOR="${{ steps.version.outputs.major }}"
|
||||||
|
|
||||||
NOTES=$(php /tmp/mokostandards/api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null)
|
NOTES=$(php /tmp/mokostandards-api/cli/release_notes.php --path . --version "$VERSION" 2>/dev/null)
|
||||||
[ -z "$NOTES" ] && NOTES="Release ${VERSION}"
|
[ -z "$NOTES" ] && NOTES="Release ${VERSION}"
|
||||||
echo "$NOTES" > /tmp/release_notes.md
|
echo "$NOTES" > /tmp/release_notes.md
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user