{"id":30052593,"url":"https://github.com/devlander-software/discord-notify","last_synced_at":"2025-08-07T17:08:01.728Z","repository":{"id":304273559,"uuid":"1018294579","full_name":"Devlander-Software/discord-notify","owner":"Devlander-Software","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-12T02:27:15.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"production","last_synced_at":"2025-07-12T04:22:59.642Z","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/Devlander-Software.png","metadata":{"files":{"readme":".github/README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2025-07-12T01:09:05.000Z","updated_at":"2025-07-12T02:27:02.000Z","dependencies_parsed_at":"2025-07-12T04:23:26.400Z","dependency_job_id":null,"html_url":"https://github.com/Devlander-Software/discord-notify","commit_stats":null,"previous_names":["devlander-software/discord-notify"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Devlander-Software/discord-notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devlander-Software%2Fdiscord-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devlander-Software%2Fdiscord-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devlander-Software%2Fdiscord-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devlander-Software%2Fdiscord-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devlander-Software","download_url":"https://codeload.github.com/Devlander-Software/discord-notify/tar.gz/refs/heads/production","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devlander-Software%2Fdiscord-notify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269292917,"owners_count":24392507,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-07T17:07:59.282Z","updated_at":"2025-08-07T17:08:01.713Z","avatar_url":"https://github.com/Devlander-Software.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Actions Setup Guide\n\nThis guide explains how to set up GitHub Actions for automated testing, building, and deploying the Discord Notify package to npm.\n\n## 📋 Workflows Overview\n\n### 1. **CI Workflow** (`ci.yml`)\n- **Triggers**: Push to main/develop, Pull Requests\n- **Purpose**: Run tests, build package, security audit\n- **Runs on**: Multiple Node.js versions (16.x, 18.x, 20.x)\n\n### 2. **Release Workflow** (`release.yml`)\n- **Triggers**: Push to main branch\n- **Purpose**: Auto-detect version changes, create GitHub releases\n- **Runs on**: Node.js 20.x\n\n### 3. **Deploy Workflow** (`deploy.yml`)\n- **Triggers**: GitHub releases, manual dispatch\n- **Purpose**: Publish package to npm\n- **Runs on**: Node.js 20.x\n\n## 🔧 Setup Instructions\n\n### Step 1: Create NPM Token\n\n1. **Login to npm:**\n   ```bash\n   npm login\n   ```\n\n2. **Create Access Token:**\n   - Go to [npmjs.com](https://www.npmjs.com)\n   - Click your profile → Access Tokens\n   - Click \"Generate New Token\"\n   - Select \"Automation\" token type\n   - Copy the token (you won't see it again!)\n\n### Step 2: Add GitHub Secrets\n\nGo to your GitHub repository → Settings → Secrets and variables → Actions\n\nAdd these secrets:\n\n| Secret Name | Value | Description |\n|-------------|-------|-------------|\n| `NPM_TOKEN` | `npm_xxxxxxxxxxxx` | Your npm automation token |\n| `DISCORD_WEBHOOK_URL` | `https://discord.com/api/webhooks/...` | Discord webhook for notifications (optional) |\n\n### Step 3: Configure Package.json\n\nMake sure your `package.json` has the correct configuration:\n\n```json\n{\n  \"name\": \"discord-notify\",\n  \"version\": \"1.0.0\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"files\": [\"dist\"],\n  \"main\": \"dist/index.js\",\n  \"types\": \"dist/index.d.ts\"\n}\n```\n\n### Step 4: Test the Setup\n\n1. **Push to main branch:**\n   ```bash\n   git add .\n   git commit -m \"feat: initial release\"\n   git push origin main\n   ```\n\n2. **Check GitHub Actions:**\n   - Go to Actions tab in your repository\n   - You should see the CI workflow running\n\n## 🚀 Deployment Process\n\n### Automatic Deployment\n\n1. **Update version in package.json:**\n   ```bash\n   npm version patch  # 1.0.0 → 1.0.1\n   npm version minor  # 1.0.1 → 1.1.0\n   npm version major  # 1.1.0 → 2.0.0\n   ```\n\n2. **Push to main:**\n   ```bash\n   git push origin main --tags\n   ```\n\n3. **What happens automatically:**\n   - CI workflow runs tests\n   - Release workflow detects version change\n   - Creates GitHub release\n   - Triggers deploy workflow\n   - Publishes to npm\n\n### Manual Deployment\n\n1. **Go to Actions tab**\n2. **Select \"Deploy to NPM\" workflow**\n3. **Click \"Run workflow\"**\n4. **Enter version number**\n5. **Click \"Run workflow\"**\n\n## 📊 Workflow Details\n\n### CI Workflow Jobs\n\n#### Test Job\n- Runs on Node.js 16.x, 18.x, 20.x\n- Installs dependencies\n- Runs linting (`npm run lint`)\n- Runs all tests (`npm run test:all`)\n- Builds package (`npm run build`)\n- Validates build output\n\n#### Integration Test Job\n- Runs only on main branch pushes\n- Uses Discord webhook from secrets\n- Runs integration tests\n- Continues on error (optional)\n\n#### Security Job\n- Runs npm audit\n- Checks for high severity vulnerabilities\n- Fails if high severity issues found\n\n### Release Workflow Jobs\n\n#### Release Job\n- Detects version changes in package.json\n- Creates GitHub release with changelog\n- Triggers deploy workflow\n- Skips if version already exists\n\n### Deploy Workflow Jobs\n\n#### Deploy Job\n- Runs tests and builds package\n- Validates package with `npm pack --dry-run`\n- Publishes to npm using NPM_TOKEN\n- Creates GitHub release (if manual trigger)\n\n## 🔍 Troubleshooting\n\n### Common Issues\n\n#### 1. **NPM Token Issues**\n```\nError: npm ERR! 401 Unauthorized\n```\n**Solution:**\n- Verify NPM_TOKEN secret is set correctly\n- Ensure token has publish permissions\n- Check if package name is available on npm\n\n#### 2. **Build Failures**\n```\nError: TypeScript compilation failed\n```\n**Solution:**\n- Run `npm run build` locally to check for errors\n- Fix TypeScript errors\n- Ensure all dependencies are installed\n\n#### 3. **Test Failures**\n```\nError: Tests are failing\n```\n**Solution:**\n- Run `npm test` locally\n- Fix failing tests\n- Check if all test dependencies are installed\n\n#### 4. **Version Conflicts**\n```\nError: Version already exists\n```\n**Solution:**\n- Update version in package.json\n- Use `npm version` to bump version\n- Push with tags: `git push --tags`\n\n### Debug Commands\n\n```bash\n# Test locally\nnpm run test:all\nnpm run build\nnpm pack --dry-run\n\n# Check npm token\nnpm whoami\n\n# Test publish (dry run)\nnpm publish --dry-run\n```\n\n## 📈 Monitoring\n\n### GitHub Actions Dashboard\n- Go to Actions tab to monitor workflow runs\n- Check logs for detailed error information\n- Set up notifications for workflow failures\n\n### NPM Package Page\n- Monitor downloads: https://www.npmjs.com/package/discord-notify\n- Check for issues or feedback\n- Monitor package health\n\n### Discord Notifications\nIf you set up DISCORD_WEBHOOK_URL, you'll get notifications for:\n- Successful deployments\n- Failed workflows\n- New releases\n\n## 🔄 Workflow Customization\n\n### Add More Tests\n```yaml\n- name: Run additional tests\n  run: npm run test:custom\n```\n\n### Add Code Coverage\n```yaml\n- name: Upload coverage\n  uses: codecov/codecov-action@v3\n  with:\n    file: ./coverage/lcov.info\n```\n\n### Add Slack Notifications\n```yaml\n- name: Notify Slack\n  uses: 8398a7/action-slack@v3\n  with:\n    status: ${{ job.status }}\n    webhook_url: ${{ secrets.SLACK_WEBHOOK }}\n```\n\n## 🎯 Best Practices\n\n1. **Always test locally** before pushing\n2. **Use semantic versioning** (patch/minor/major)\n3. **Write meaningful commit messages**\n4. **Monitor workflow runs** regularly\n5. **Keep dependencies updated**\n6. **Use descriptive release notes**\n\n## 📞 Support\n\nIf you encounter issues:\n1. Check the troubleshooting section above\n2. Review GitHub Actions logs\n3. Test locally with the debug commands\n4. Open an issue in the repository\n5. Join our [Discord community](https://bit.ly/devlander-discord-invite) for help ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlander-software%2Fdiscord-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevlander-software%2Fdiscord-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlander-software%2Fdiscord-notify/lists"}