Update a Private Package
Once a private package is set up properly, it can be updated with a fairly simple workflow.
Clone the private package repo locally
Ensure you have the StellarWP GitHub repo for the private package cloned locally.
Download the newest production version of the package
If the package is currently at version 1.2.3, for example, you'd want to get the full production version of 1.2.4.
Since we're often working with premium WordPress plugins, this would mean logging into the vendor account that provides the plugin, and downloading the production .zip of the plugin at its latest version.
Remove [most of] the files in the repo
You'll want to make sure that composer.json is not deleted.
If the repo has a .gitignore file and/or a .github/ directory, these should not be deleted either.
Otherwise, git rm -rf everything else in the repo.
Add the new production files to the repo
Unzip the production .zip and replace the contents of the repo with the new files.
Again, ensure that the composer.json file from the previous step is still in the repo.
If the production .zip includes its own composer.json (and/or composer.lock), delete these.
Update the composer.json with the new version
Let's say you're updating the plugin from version 1.2.3 to 1.2.4.
In the composer.json, update the version field to 1.2.4.
Push your changes to the repo
git add all of your changes, and git push them to the main branch.
Tag the new version
Tag the main branch with the new version number.
git tag 1.2.4
git push origin 1.2.4
Once this is done, the private package is updated and ready to be used in other projects.