Skip to content

Commit 643fc8c

Browse files
authored
Merge pull request #52 from selemondev/chore(github-workflows)
chore(github-workflows): add Github workflows and issue templates
2 parents 72e77a9 + 2f743f3 commit 643fc8c

File tree

5 files changed

+1918
-0
lines changed

5 files changed

+1918
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: 🐛 Bug Report
2+
description: Report a bug to help us improve
3+
labels: [bug, triage]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
## 🙏 Thanks for taking the time to report this issue!
9+
### Please complete the information below to help us fix the problem quickly.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: 🔍 Describe the bug
15+
description: A clear and concise description of what the bug is
16+
placeholder: When I try to use the package, it crashes ...
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: reproduction
22+
attributes:
23+
label: 🔄 Steps to reproduce
24+
description: How can we recreate this issue? Be specific!
25+
placeholder: |
26+
1. Go to '...'
27+
2. Click on '...'
28+
3. See error
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: expected
34+
attributes:
35+
label: ✅ Expected behavior
36+
description: What did you expect to happen?
37+
placeholder: The package should ...
38+
validations:
39+
required: true
40+
41+
- type: dropdown
42+
id: os
43+
attributes:
44+
label: 💻 Operating System
45+
multiple: true
46+
options:
47+
- Windows
48+
- macOS
49+
- Linux
50+
- iOS
51+
- Android
52+
- Other (please specify in Additional Info)
53+
validations:
54+
required: true
55+
56+
- type: input
57+
id: version
58+
attributes:
59+
label: 📊 Package Version
60+
description: What version of the package are you using?
61+
placeholder: e.g., v1.0.0
62+
validations:
63+
required: false
64+
65+
- type: textarea
66+
id: screenshots
67+
attributes:
68+
label: 📷 Screenshots
69+
description: If applicable, add screenshots to help explain your problem
70+
placeholder: You can paste images directly here!
71+
validations:
72+
required: false
73+
74+
- type: textarea
75+
id: additional
76+
attributes:
77+
label: 📝 Additional context
78+
description: Add any other information about the problem here
79+
placeholder: Environment details, related issues, etc.
80+
validations:
81+
required: false
82+
83+
- type: checkboxes
84+
id: terms
85+
attributes:
86+
label: ✨ Before submitting
87+
description: Please confirm the following
88+
options:
89+
- label: 🔍 I've searched for existing issues and this hasn't been reported before
90+
required: true
91+
- label: ℹ️ I've included all the information needed to reproduce the issue
92+
required: true
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: ✨ Feature Request
2+
description: Suggest an idea or enhancement for this project
3+
labels: [enhancement]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
## 🌟 Thanks for taking the time to share your ideas!
9+
### We appreciate your contribution to making our project better.
10+
11+
- type: dropdown
12+
id: feature_type
13+
attributes:
14+
label: 🎯 Type of feature
15+
description: What kind of feature are you proposing?
16+
options:
17+
- New functionality
18+
- Enhancement to existing feature
19+
- User experience improvement
20+
- Performance improvement
21+
- Other (please describe below)
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: problem
27+
attributes:
28+
label: 🤔 Is your feature request related to a problem?
29+
description: Please describe what problem you're trying to solve
30+
placeholder: I'm always frustrated when [...]
31+
validations:
32+
required: false
33+
34+
- type: textarea
35+
id: solution
36+
attributes:
37+
label: 💡 Desired solution
38+
description: Describe what you want to happen
39+
placeholder: It would be great if the package could...
40+
validations:
41+
required: true
42+
43+
- type: textarea
44+
id: alternatives
45+
attributes:
46+
label: 🔄 Alternatives considered
47+
description: Describe any alternative solutions or features you've considered
48+
placeholder: I thought about implementing it by...
49+
validations:
50+
required: false
51+
52+
- type: textarea
53+
id: examples
54+
attributes:
55+
label: 🔍 Examples from other projects
56+
description: Are there other projects that have something similar to what you're requesting?
57+
placeholder: This feature exists in [project link] and works by...
58+
validations:
59+
required: false
60+
61+
- type: textarea
62+
id: context
63+
attributes:
64+
label: 📝 Additional context
65+
description: Add any other context, mockups, or screenshots about the feature request here
66+
placeholder: You can paste images directly here!
67+
validations:
68+
required: false
69+
70+
- type: checkboxes
71+
id: terms
72+
attributes:
73+
label: ✅ Before submitting
74+
options:
75+
- label: 🔍 I've searched for existing feature requests and this hasn't been suggested before
76+
required: true
77+
- label: 🙋 I'm willing to help implement or test this feature if needed
78+
required: false

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v2
20+
21+
- name: Set node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: lts/*
25+
26+
- name: Install
27+
run: pnpm i
28+
29+
- name: Build
30+
run: pnpm build:package
31+
32+
test:
33+
runs-on: ${{ matrix.os }}
34+
35+
strategy:
36+
matrix:
37+
node: [lts/*]
38+
os: [ubuntu-latest, windows-latest, macos-latest]
39+
fail-fast: false
40+
41+
steps:
42+
- uses: actions/checkout@v3
43+
44+
- name: Install pnpm
45+
uses: pnpm/action-setup@v2
46+
47+
- name: Set node ${{ matrix.node }}
48+
uses: actions/setup-node@v3
49+
with:
50+
node-version: ${{ matrix.node }}
51+
52+
- name: Install
53+
run: pnpm i
54+
55+
- name: Build
56+
run: pnpm build:package

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: [18.x, 20.x]
20+
cache: npm
21+
22+
- run: npx changelogithub
23+
continue-on-error: true
24+
env:
25+
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
26+
27+
- name: Install
28+
run: npm install
29+
30+
- name: Build
31+
run: npm run build
32+
33+
- name: Test
34+
run: npm run test
35+
36+
- name: Config npm
37+
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
38+
env:
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
41+
- name: Publish to npm
42+
run: npm publish --access public --no-git-checks

0 commit comments

Comments
 (0)