From c0fe1b43a2092f9d0ca314ae1219399ba4b81d03 Mon Sep 17 00:00:00 2001 From: Irshad Ahmad <94346512+irshadahmad21@users.noreply.github.com> Date: Fri, 26 Jan 2024 21:39:23 +0530 Subject: [PATCH] Fix deployment for PHP pacages (#65) --- .changeset/new-points-beam.md | 7 +++++++ .github/workflows/deploy-php-package.yml | 10 +++++++--- packages/php/telegram-format-text/package.json | 2 +- packages/php/wp-utils/package.json | 2 +- packages/php/wptelegram-bot-api/package.json | 2 +- 5 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 .changeset/new-points-beam.md diff --git a/.changeset/new-points-beam.md b/.changeset/new-points-beam.md new file mode 100644 index 00000000..16dae9ff --- /dev/null +++ b/.changeset/new-points-beam.md @@ -0,0 +1,7 @@ +--- +"@wpsocio/telegram-format-text": major +"@wpsocio/wptelegram-bot-api": major +"@wpsocio/wp-utils": major +--- + +First public release. diff --git a/.github/workflows/deploy-php-package.yml b/.github/workflows/deploy-php-package.yml index ed2c4593..b494440c 100644 --- a/.github/workflows/deploy-php-package.yml +++ b/.github/workflows/deploy-php-package.yml @@ -25,15 +25,19 @@ jobs: - name: Prepare run: | + # Change dir to the package + cd ${{ fromJson(needs.details.outputs.result).path }} # Create a temp dir and move the files to it - mkdir -p temp/${{ fromJson(needs.details.outputs.result).path }} + mkdir -p temp # Move only the files that are needed - mv -t temp/${{ fromJson(needs.details.outputs.result).path }} composer.json src/ LICENSE README.md CHANGELOG.md .gitignore + mv -t temp/ composer.json src/ LICENSE README.md CHANGELOG.md .gitignore + # Reset pwd + cd - - name: Deploy to repo uses: manzoorwanijk/action-deploy-to-repo@v3 with: - src_dir: temp/${{ fromJson(needs.details.outputs.result).path }} + src_dir: ${{ fromJson(needs.details.outputs.result).path }}/temp target_repo: ${{ fromJson(needs.details.outputs.result).repo }} target_dir: "." target_branch: main diff --git a/packages/php/telegram-format-text/package.json b/packages/php/telegram-format-text/package.json index 287b806f..95761488 100644 --- a/packages/php/telegram-format-text/package.json +++ b/packages/php/telegram-format-text/package.json @@ -1,6 +1,6 @@ { "name": "@wpsocio/telegram-format-text", - "version": "1.0.0", + "version": "0.0.0", "private": true, "type": "module", "scripts": { diff --git a/packages/php/wp-utils/package.json b/packages/php/wp-utils/package.json index 1db3899f..9407d38d 100644 --- a/packages/php/wp-utils/package.json +++ b/packages/php/wp-utils/package.json @@ -1,6 +1,6 @@ { "name": "@wpsocio/wp-utils", - "version": "1.0.0", + "version": "0.0.0", "private": true, "type": "module", "scripts": { diff --git a/packages/php/wptelegram-bot-api/package.json b/packages/php/wptelegram-bot-api/package.json index 9e8a3e9b..7030fa35 100644 --- a/packages/php/wptelegram-bot-api/package.json +++ b/packages/php/wptelegram-bot-api/package.json @@ -1,6 +1,6 @@ { "name": "@wpsocio/wptelegram-bot-api", - "version": "1.0.0", + "version": "0.0.0", "private": true, "type": "module", "scripts": {