Skip to content

Commit 59b482f

Browse files
committed
ci: add GitHub Actions workflows
- CI workflow: lint, format, test, and build on PR/push - Publish workflow: automated npm release on GitHub releases - Configure Dependabot for dependency updates - Add issue and PR templates
1 parent 36f7db5 commit 59b482f

File tree

6 files changed

+232
-0
lines changed

6 files changed

+232
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Steps to Reproduce
14+
15+
1. Run command '...'
16+
2. Select options '...'
17+
3. See error
18+
19+
## Expected Behavior
20+
21+
What you expected to happen.
22+
23+
## Actual Behavior
24+
25+
What actually happened.
26+
27+
## Environment
28+
29+
- **OS**: [e.g., macOS 14, Windows 11, Ubuntu 22.04]
30+
- **Node.js version**: [e.g., 18.17.0]
31+
- **npm/yarn/pnpm version**: [e.g., npm 9.8.1]
32+
- **launchts version**: [e.g., 1.0.0]
33+
34+
## Screenshots
35+
36+
If applicable, add screenshots to help explain your problem.
37+
38+
## Additional Context
39+
40+
Add any other context about the problem here.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
11+
A clear and concise description of the feature you'd like to see.
12+
13+
## Problem it Solves
14+
15+
Describe the problem this feature would solve. Ex: I'm always frustrated when [...]
16+
17+
## Proposed Solution
18+
19+
Describe how you envision this feature working.
20+
21+
## Alternatives Considered
22+
23+
Describe any alternative solutions or features you've considered.
24+
25+
## Additional Context
26+
27+
Add any other context, mockups, or examples about the feature request here.
28+
29+
## Checklist
30+
31+
- [ ] I've searched existing issues to ensure this feature hasn't been requested
32+
- [ ] This feature aligns with the project's goals
33+
- [ ] I'm willing to contribute a PR for this feature

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Pull Request
2+
3+
## Description
4+
5+
Brief description of what this PR does.
6+
7+
## Related Issue
8+
9+
Closes #(issue number)
10+
11+
## Type of Change
12+
13+
- [ ] Bug fix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16+
- [ ] Documentation update
17+
- [ ] Test update
18+
- [ ] Code style update (formatting, renaming)
19+
- [ ] Refactoring (no functional changes)
20+
21+
## Checklist
22+
23+
- [ ] My code follows the project's code style
24+
- [ ] I have run `npm run lint` and `npm run format`
25+
- [ ] I have added tests that prove my fix/feature works
26+
- [ ] All tests pass (`npm test`)
27+
- [ ] I have updated the documentation accordingly
28+
- [ ] My commits follow the [Conventional Commits](https://www.conventionalcommits.org/) specification
29+
30+
## Testing
31+
32+
Describe how you tested your changes:
33+
34+
```bash
35+
# Example commands
36+
npm run build
37+
npm link
38+
launchts test-project --yes
39+
```
40+
41+
## Screenshots (if applicable)
42+
43+
Add screenshots to demonstrate the changes.
44+
45+
## Additional Notes
46+
47+
Any additional information that reviewers should know.

.github/dependabot.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm dependencies
4+
- package-ecosystem: 'npm'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
day: 'monday'
9+
open-pull-requests-limit: 5
10+
labels:
11+
- 'dependencies'
12+
- 'automated'
13+
commit-message:
14+
prefix: 'chore'
15+
include: 'scope'
16+
reviewers:
17+
- 'Jszigeti'
18+
assignees:
19+
- 'Jszigeti'
20+
# Group minor and patch updates together
21+
groups:
22+
development-dependencies:
23+
dependency-type: 'development'
24+
update-types:
25+
- 'minor'
26+
- 'patch'
27+
production-dependencies:
28+
dependency-type: 'production'
29+
update-types:
30+
- 'minor'
31+
- 'patch'
32+
33+
# Enable version updates for GitHub Actions
34+
- package-ecosystem: 'github-actions'
35+
directory: '/'
36+
schedule:
37+
interval: 'weekly'
38+
day: 'monday'
39+
labels:
40+
- 'dependencies'
41+
- 'github-actions'
42+
commit-message:
43+
prefix: 'ci'

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
cache: 'npm'
19+
- run: npm ci
20+
- run: npm run lint
21+
- run: npm run format -- --check
22+
- run: npm test -- --run
23+
- run: npm run build

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish to npm and GitHub Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Use Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '18'
18+
registry-url: 'https://registry.npmjs.org'
19+
cache: 'npm'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Lint
25+
run: npm run lint
26+
27+
- name: Format check
28+
run: npm run format -- --check
29+
30+
- name: Run tests
31+
run: npm test -- --run
32+
33+
- name: Build
34+
run: npm run build
35+
36+
- name: Publish to npm
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
run: npm publish --access public
40+
41+
- name: Upload build artifact to GitHub Release
42+
uses: softprops/action-gh-release@v1
43+
with:
44+
files: dist/**/*
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)