diff --git a/.github/workflows/publish-on-merge.yml b/.github/workflows/publish-on-merge.yml index a60990d3..73ae4f5d 100644 --- a/.github/workflows/publish-on-merge.yml +++ b/.github/workflows/publish-on-merge.yml @@ -127,11 +127,36 @@ jobs: if git diff --quiet package.json; then echo "No version changes needed" else + # Create a new branch for the version sync + git checkout -b "chore/sync-version-${{ steps.version.outputs.version }}" git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add package.json git commit -m "chore: sync version ${{ steps.version.outputs.version }} from prod [skip ci]" - git push origin main + git push origin "chore/sync-version-${{ steps.version.outputs.version }}" + + # Create pull request to merge the version sync + gh pr create \ + --repo de-id/agents-sdk \ + --title "chore: sync version ${{ steps.version.outputs.version }} from prod" \ + --body "## Version Sync + + This PR syncs the version number from the production release back to the main branch. + + ### Changes + - Updated version from previous version to ${{ steps.version.outputs.version }} + + ### Related + - Production Release: [v${{ steps.version.outputs.version }}](https://github.com/d-id/agents-sdk/releases/tag/v${{ steps.version.outputs.version }}) + - NPM Package: [@d-id/client-sdk@${{ steps.version.outputs.version }}](https://www.npmjs.com/package/@d-id/client-sdk/v/${{ steps.version.outputs.version }}) + + ### Next Steps + - [ ] Review the changes + - [ ] Merge when ready" \ + --base main \ + --head "chore/sync-version-${{ steps.version.outputs.version }}" \ + --label "dependencies" \ + --label "automated" fi - name: Create GitHub Release (prod only) diff --git a/package.json b/package.json index 7f86ced6..2548c25c 100644 --- a/package.json +++ b/package.json @@ -1,48 +1,48 @@ { - "name": "@d-id/client-sdk", - "private": false, - "version": "1.1.2", - "type": "module", - "description": "d-id client sdk", - "repository": { - "type": "git", - "url": "https://github.com/de-id/agents-sdk" - }, - "keywords": [ - "d-id", - "sdk", - "client-sdk" - ], - "license": "MIT", - "author": "d-id", - "files": [ - "dist/*" - ], - "main": "./dist/index.umd.cjs", - "module": "./dist/index.js", - "types": "./dist/src/index.d.ts", - "scripts": { - "dev": "vite", - "build": "node ./infra/build.js -m production", - "build:dev": "node ./infra/build.js -m development", - "dev:prod": "export NODE_ENV=production && vite --mode production", - "deploy:prod": "node ./infra/deploy.js --version beta", - "preview": "vite preview", - "test-build": "node .infra/build.js -m development", - "build:docs": "typedoc" - }, - "devDependencies": { - "@preact/preset-vite": "^2.8.1", - "@trivago/prettier-plugin-sort-imports": "^4.3.0", - "@types/node": "^22.15.0", - "commander": "^11.1.0", - "glob": "^10.3.10", - "preact": "^10.19.6", - "prettier": "^3.2.5", - "prettier-plugin-organize-imports": "^3.2.4", - "typedoc": "^0.25.7", - "typescript": "^5.3.3", - "vite": "^5.1.4", - "vite-plugin-dts": "^3.7.3" - } + "name": "@d-id/client-sdk", + "private": false, + "version": "1.1.2", + "type": "module", + "description": "d-id client sdk", + "repository": { + "type": "git", + "url": "https://github.com/de-id/agents-sdk" + }, + "keywords": [ + "d-id", + "sdk", + "client-sdk" + ], + "license": "MIT", + "author": "d-id", + "files": [ + "dist/*" + ], + "main": "./dist/index.umd.cjs", + "module": "./dist/index.js", + "types": "./dist/src/index.d.ts", + "scripts": { + "dev": "vite", + "build": "node ./infra/build.js -m production", + "build:dev": "node ./infra/build.js -m development", + "dev:prod": "export NODE_ENV=production && vite --mode production", + "deploy:prod": "node ./infra/deploy.js --version beta", + "preview": "vite preview", + "test-build": "node .infra/build.js -m development", + "build:docs": "typedoc" + }, + "devDependencies": { + "@preact/preset-vite": "^2.8.1", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@types/node": "^22.15.0", + "commander": "^11.1.0", + "glob": "^10.3.10", + "preact": "^10.19.6", + "prettier": "^3.2.5", + "prettier-plugin-organize-imports": "^3.2.4", + "typedoc": "^0.25.7", + "typescript": "^5.3.3", + "vite": "^5.1.4", + "vite-plugin-dts": "^3.7.3" + } }