This branch serves as a template for automating the process of publishing libraries to NPM. You can add a new library and configure a dedicated GitHub workflow to handle its publishing seamlessly.
Additionally, you can run GitHub Actions locally using the gh act extension for easier testing and debugging.
- Template for multiple libraries: Easily add and manage new libraries for automated publishing.
- GitHub Actions integration: Configure workflows for automatic builds and publishing.
- Local Action testing: Test and debug workflows on your local machine before pushing changes.
To run workflows locally, you need to install the gh act extension see gh-act.
After installation run:
gh act -j 'job-name' --pull=false
- Create the library: Add your library under the appropriate folder in the repository.
- Write a workflow: Define a GitHub workflow for the library, specifying its build and publishing steps.
- Test locally: Use gh act to ensure your workflow is correctly configured.
- Push to the repository: The workflow will automatically trigger on the appropriate events (e.g., pushes to main).
Follow these steps to set up a new workspace and libraries from scratch:
Create a new folder for your workspace:
mkdir my-workspace
cd my-workspace
git init
Run the following command to create an Angular workspace without a default application:
ng new my-workspace --no-create-application
cd my-workspace
ng generate library my-lib