Skip to content

Commit 6e13c2d

Browse files
committed
add core files
1 parent f81bcfb commit 6e13c2d

File tree

6 files changed

+97
-0
lines changed

6 files changed

+97
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @GrantBirki

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# vscode
2+
.vscode
3+
4+
# Dependency directory
5+
node_modules/
6+
7+
# Coverage directory used by tools like istanbul
8+
coverage
9+
10+
# Optional npm cache directory
11+
.npm
12+
13+
# Optional eslint cache
14+
.eslintcache
15+
16+
# OS metadata
17+
.DS_Store
18+
Thumbs.db
19+
20+
# Extra
21+
tmp/

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.9.0

CONTRIBUTING.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributing 💻
2+
3+
All contributions are welcome and greatly appreciated!
4+
5+
## Steps to Contribute 💡
6+
7+
> Check the `.node-version` file in the root of this repo so see what version of Node.js is required for local development - note, this can be different from the version of Node.js which runs the Action on GitHub runners. It is suggested to download [nodenv](https://github.com/nodenv/nodenv) which uses this file and manages your Node.js versions for you
8+
9+
1. Fork this repository
10+
2. Commit your changes
11+
3. Test your changes (learn how to test below)
12+
4. Open a pull request back to this repository
13+
> Make sure to run `npm run all` as your final commit!
14+
5. Notify the maintainers of this repository for peer review and approval
15+
6. Merge!
16+
17+
The maintainers of this repository will create a new release with your changes so that everyone can use the new release and enjoy the awesome features of this Action
18+
19+
## Testing 🧪
20+
21+
This project requires **100%** test coverage
22+
23+
### Running the test suite (required)
24+
25+
Simply run the following command to execute the entire test suite:
26+
27+
```bash
28+
npm run test
29+
```
30+
31+
> Note: this requires that you have already run `npm install`
32+
33+
### Testing FAQs 🤔
34+
35+
Answers to questions you might have around testing
36+
37+
Q: Why do I have to commit my changes to `main`?
38+
39+
A: The `on: issue_comment` workflow only uses workflow files from the `main` branch by design - [learn more in the branch-deploy repo](https://github.com/github/branch-deploy#security-)
40+
41+
Q: How can I test my changes once my PR is merged and *before* a new release is created?
42+
43+
A: You should create a repo like [this one](https://github.com/GrantBirki/actions-sandbox) that uses `github/command@main` as the Action version and test your changes there

badges/coverage.svg

Lines changed: 1 addition & 0 deletions
Loading

script/release

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Usage:
4+
# script/release
5+
6+
# COLORS
7+
OFF='\033[0m'
8+
RED='\033[0;31m'
9+
GREEN='\033[0;32m'
10+
BLUE='\033[0;34m'
11+
12+
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
13+
echo -e "The latest release tag is: ${BLUE}${latest_tag}${OFF}"
14+
read -p 'New Release Tag (vX.X.X format): ' new_tag
15+
16+
tag_regex='^v\d\.\d\.\d$'
17+
echo "$new_tag" | grep -P -q $tag_regex
18+
19+
if [[ $? -ne 0 ]]; then
20+
echo "Tag: $new_tag is valid"
21+
fi
22+
23+
git tag -a $new_tag -m "$new_tag Release"
24+
25+
echo -e "${GREEN}OK${OFF} - Tagged: $new_tag"
26+
27+
git push --tags
28+
29+
echo -e "${GREEN}OK${OFF} - Tags pushed to remote!"
30+
echo -e "${GREEN}DONE${OFF}"

0 commit comments

Comments
 (0)