{"id":19251355,"url":"https://github.com/springtype-org/github-action-npm-publish","last_synced_at":"2025-06-17T02:38:16.966Z","repository":{"id":40717857,"uuid":"266142742","full_name":"springtype-org/github-action-npm-publish","owner":"springtype-org","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-28T08:58:34.000Z","size":349,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T06:29:49.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/springtype-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-22T15:20:59.000Z","updated_at":"2024-05-28T08:58:37.000Z","dependencies_parsed_at":"2024-11-09T18:24:29.731Z","dependency_job_id":"9539c198-3ab3-4742-8ba3-3b736a6dceeb","html_url":"https://github.com/springtype-org/github-action-npm-publish","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springtype-org%2Fgithub-action-npm-publish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springtype-org%2Fgithub-action-npm-publish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springtype-org%2Fgithub-action-npm-publish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springtype-org%2Fgithub-action-npm-publish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/springtype-org","download_url":"https://codeload.github.com/springtype-org/github-action-npm-publish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240347763,"owners_count":19787230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T18:22:01.862Z","updated_at":"2025-02-23T16:40:42.789Z","avatar_url":"https://github.com/springtype-org.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003egithub-action-npm-publish\u003c/h1\u003e\n\n\u003e This GitHub Action automates the process of publishing npm packages. It simplifies the workflow for JavaScript and TypeScript projects by integrating seamlessly with your CI/CD pipeline. With this action, you can automatically publish your npm package whenever changes are pushed to your repository, ensuring that your package is always up-to-date with the latest commits.\n\n\u003ch2 align=\"center\"\u003eUser Stories\u003c/h2\u003e\n\n1. As a developer, I want to automate the npm publishing process to save time and reduce manual errors.\n2. As a developer, I want to ensure that my npm package is published whenever changes are pushed to the main branch.\n\n\u003ch2 align=\"center\"\u003eFeatures\u003c/h2\u003e\n\n- ✅ Automates npm package publishing\n- ✅ Integrates seamlessly with GitHub Actions workflows\n- ✅ Supports scoped packages\n- ✅ Configurable to run on specific branches or tags\n- ✅ Securely handles npm authentication\n- ✅ Provides detailed logs for troubleshooting\n- ✅ Supports both JavaScript and TypeScript projects\n- ✅ Easily configurable via `npmrc` settings\n\n\u003ch2 align=\"center\"\u003eExample Usage\u003c/h2\u003e\n\n\u003ch3 align=\"center\"\u003eSetup\u003c/h3\u003e\n\n1. **Create a GitHub Workflow File**:\n   Add a new YAML file in `.github/workflows/` (e.g., `publish.yml`):\n\n   ```yaml\n   name: Publish to npm\n\n   on:\n     push:\n       branches:\n         - main\n\n   jobs:\n     publish:\n       runs-on: ubuntu-latest\n\n       steps:\n         - name: Checkout code\n           uses: actions/checkout@v2\n\n         - name: Setup Node.js\n           uses: actions/setup-node@v2\n           with:\n             node-version: '14'\n\n         - name: Install dependencies\n           run: npm install\n\n         - name: Publish to npm\n           uses: your-username/github-action-npm-publish@v1\n           with:\n             authToken: ${{ secrets.NPM_AUTH_TOKEN }}\n             registry: 'https://registry.npmjs.org/'\n   ```\n\n2. **Set Up npm Authentication**:\n   Store your npm authentication token as a secret in your GitHub repository settings. Go to `Settings \u003e Secrets` and add a new secret named `NPM_AUTH_TOKEN` with your npm token.\n\n\u003ch3 align=\"center\"\u003eUsing the Action\u003c/h3\u003e\n\n- **Publishing**:\n  The action will automatically publish your package to npm whenever you push changes to the `main` branch (or any other branch you configure).\n\n```yaml\n- name: Publish to npm\n  uses: your-username/github-action-npm-publish@v1\n  with:\n    authToken: ${{ secrets.NPM_AUTH_TOKEN }}\n    registry: 'https://registry.npmjs.org/'\n```\n\n\u003ch2 align=\"center\"\u003eConfiguration\u003c/h2\u003e\n\n- **authToken**: The npm authentication token. Store it securely in GitHub secrets.\n- **registry**: The npm registry URL (default: `https://registry.npmjs.org/`).\n\n\u003ch2 align=\"center\"\u003eTroubleshooting\u003c/h2\u003e\n\n- Ensure that the `NPM_AUTH_TOKEN` secret is correctly set in your GitHub repository.\n- Verify that the workflow file is correctly configured and located in the `.github/workflows/` directory.\n- Check the action logs in the GitHub Actions tab for detailed error messages and troubleshooting steps.\n\n\u003ch2 align=\"center\"\u003eSupport\u003c/h2\u003e\n\nFor any issues or feature requests, please open an issue on the [GitHub repository](https://github.com/your-username/github-action-npm-publish/issues).\n\n---\n\nThis action simplifies and automates the npm publishing process, ensuring that your packages are always up-to-date with minimal manual intervention.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringtype-org%2Fgithub-action-npm-publish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringtype-org%2Fgithub-action-npm-publish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringtype-org%2Fgithub-action-npm-publish/lists"}