mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
chore: adjust version bump timing in synchronization workflow
Update the GitHub Actions workflow to bump the version in package.json after installing dependencies, ensuring that the version is not overwritten by pnpm install. This change enhances the reliability of version synchronization for both MCP and CLI repositories.
This commit is contained in:
28
.github/workflows/sync-version.yml
vendored
28
.github/workflows/sync-version.yml
vendored
@@ -23,26 +23,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/mcp.git mcp-repo
|
git clone https://x-access-token:${{ secrets.DOCS_SYNC_TOKEN }}@github.com/dokploy/mcp.git mcp-repo
|
||||||
cd mcp-repo
|
cd mcp-repo
|
||||||
|
|
||||||
# Bump version
|
|
||||||
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
|
||||||
mv package.json.tmp package.json
|
|
||||||
|
|
||||||
# Regenerate tools from latest OpenAPI spec
|
# Regenerate tools from latest OpenAPI spec
|
||||||
npm install -g pnpm
|
npm install -g pnpm
|
||||||
pnpm install
|
pnpm install
|
||||||
pnpm run fetch-openapi
|
pnpm run fetch-openapi
|
||||||
pnpm run generate
|
pnpm run generate
|
||||||
|
|
||||||
|
# Bump version after install so pnpm install doesn't overwrite it
|
||||||
|
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
||||||
|
mv package.json.tmp package.json
|
||||||
|
|
||||||
git config user.name "Dokploy Bot"
|
git config user.name "Dokploy Bot"
|
||||||
git config user.email "bot@dokploy.com"
|
git config user.email "bot@dokploy.com"
|
||||||
|
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "chore: bump version to ${{ steps.get_version.outputs.version }}" \
|
git commit -m "chore: bump version to ${{ steps.get_version.outputs.version }}" \
|
||||||
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
-m "Source: ${{ github.repository }}@${{ github.sha }}" \
|
||||||
-m "Release: ${{ github.event.release.html_url }}" \
|
-m "Release: ${{ github.event.release.html_url }}" \
|
||||||
--allow-empty
|
--allow-empty
|
||||||
|
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
|
||||||
@@ -52,18 +52,18 @@ jobs:
|
|||||||
|
|
||||||
cd cli-repo
|
cd cli-repo
|
||||||
|
|
||||||
# Bump version
|
|
||||||
if [ -f package.json ]; then
|
|
||||||
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
|
||||||
mv package.json.tmp package.json
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy latest openapi spec and regenerate commands
|
# Copy latest openapi spec and regenerate commands
|
||||||
cp ../openapi.json ./openapi.json
|
cp ../openapi.json ./openapi.json
|
||||||
npm install -g pnpm
|
npm install -g pnpm
|
||||||
pnpm install
|
pnpm install
|
||||||
pnpm run generate
|
pnpm run generate
|
||||||
|
|
||||||
|
# Bump version after install so pnpm install doesn't overwrite it
|
||||||
|
if [ -f package.json ]; then
|
||||||
|
jq --arg v "${{ steps.get_version.outputs.version }}" '.version = $v' package.json > package.json.tmp
|
||||||
|
mv package.json.tmp package.json
|
||||||
|
fi
|
||||||
|
|
||||||
git config user.name "Dokploy Bot"
|
git config user.name "Dokploy Bot"
|
||||||
git config user.email "bot@dokploy.com"
|
git config user.email "bot@dokploy.com"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user