-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enhance project for production readiness
- Added README.md with project overview and setup instructions. - Added development.md with guidelines and best practices for contributors. - Introduced GitHub Actions workflows to automate testing and deployment processes.
- Loading branch information
Showing
28 changed files
with
912 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: 'bug: ' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Bug description | ||
|
||
<!-- A clear and concise description of what the bug is. --> | ||
|
||
- Would you like to work on a fix? [y/n] | ||
|
||
## To Reproduce | ||
|
||
Steps to reproduce the behavior: | ||
|
||
1. ... | ||
2. ... | ||
3. ... | ||
4. ... | ||
|
||
<!-- Make sure you are able to reproduce the bug in the main branch, too. --> | ||
|
||
## Expected behavior | ||
|
||
<!-- A clear and concise description of what you expected to happen. --> | ||
|
||
## Screenshots | ||
|
||
<!-- If applicable, add screenshots to help explain your problem. --> | ||
|
||
## Environment | ||
|
||
<!-- Please fill the following information. --> | ||
|
||
- OS: [e.g. Ubuntu 20.04] | ||
- setup_me_action version: [e.g. 0.1.0] | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context about the problem here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: 'Feature Request: ' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Motivations | ||
|
||
<!-- | ||
If your feature request is related to a problem, please describe it. | ||
--> | ||
|
||
- Would you like to implement this feature? [y/n] | ||
|
||
## Solution | ||
|
||
<!-- Describe the solution you'd like. --> | ||
|
||
## Alternatives | ||
|
||
<!-- Describe any alternative solutions or features you've considered. --> | ||
|
||
## Additional context | ||
|
||
<!-- Add any other context or screenshots about the feature request here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- Please explain the changes you made --> | ||
|
||
<!-- | ||
Please make sure: | ||
- you have read the contributing guidelines: | ||
https://github.com/pplmx/setup-me-action/blob/main/docs/CONTRIBUTING.md | ||
- you have updated the changelog (if needed): | ||
https://github.com/pplmx/setup-me-action/blob/main/CHANGELOG.md | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
version: 1 | ||
|
||
labels: | ||
# Type: Build-related changes | ||
- label: "@type/build" | ||
title: '^build(?:\(.+\))?\!?:' | ||
|
||
# Type: CI-related changes | ||
- label: "@type/ci" | ||
title: '^ci(?:\(.+\))?\!?:' | ||
files: | ||
- '\.github/.+' | ||
|
||
# Type: Documentation changes | ||
- label: "@type/docs" | ||
title: '^docs(?:\(.+\))?\!?:' | ||
files: | ||
- "docs/.+" | ||
- "**/*.md" | ||
|
||
# Type: New feature | ||
- label: "@type/feature" | ||
title: '^feat(?:\(.+\))?\!?:' | ||
|
||
# Type: Bug fix | ||
- label: "@type/fix" | ||
title: '^fix(?:\(.+\))?\!?:' | ||
|
||
# Type: Improvements such as style changes, refactoring, or performance improvements | ||
- label: "@type/improve" | ||
title: '^(style|refactor|perf)(?:\(.+\))?\!?:' | ||
|
||
# Type: Dependency changes | ||
- label: "@type/dependency" | ||
title: '^(chore|build)(?:\(deps\))?\!?:' | ||
|
||
# Type: Test-related changes | ||
- label: "@type/test" | ||
title: '^test(?:\(.+\))?\!?:' | ||
files: | ||
- "tests/.+" | ||
- "spec/.+" | ||
|
||
# Type: Security-related changes | ||
- label: "@type/security" | ||
title: '^security(?:\(.+\))?\!?:' | ||
files: | ||
- "**/security/.+" | ||
|
||
# Issue Type Only: Feature Request | ||
- label: "Feature Request" | ||
type: issue | ||
title: "^Feature Request:" | ||
|
||
# Issue Type Only: Documentation | ||
- label: "Documentation" | ||
type: issue | ||
title: "^.*(\b[Dd]ocumentation|doc(s)?\b).*" | ||
|
||
# Issue Type Only: Bug Report | ||
- label: "Bug Report" | ||
type: issue | ||
title: "^.*(\b[Bb]ug|b(u)?g(s)?\b).*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
# Check for updates every Monday | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["config:base"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: CD # Continuous Deployment or Delivery | ||
|
||
on: | ||
push: | ||
# e.g. 1.0.0, v2.0.0, v0.1.0, v0.2.0-alpha, v0.3.0+build-71edf32 | ||
tags: | ||
- '[v]?[0-9]+\.[0-9]+\.[0-9]+.*' | ||
|
||
jobs: | ||
dd: | ||
name: Deploy or Delivery | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CI # Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test: | ||
name: Node.js-${{ matrix.node }} | ||
|
||
strategy: | ||
matrix: | ||
node: [ 18, 20, 22 ] | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
|
||
fail-fast: false | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Init dependencies | ||
run: make init | ||
|
||
- name: Build | ||
run: make build | ||
|
||
- name: Run tests | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build and Push Docker Image | ||
|
||
on: | ||
push: | ||
tags: | ||
- '^v[0-9]+\.[0-9]+\.[0-9]+.*$' | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Acquire tag name | ||
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#refs/*/}" >> $GITHUB_ENV | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Build and Export to Docker | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
load: true | ||
tags: | | ||
ghcr.io/pplmx/setup-me-action:latest | ||
ghcr.io/pplmx/setup-me-action:${GITHUB_REF_NAME:1} | ||
- | ||
name: Test it before Push | ||
run: | | ||
docker run --rm ghcr.io/pplmx/setup-me-action:latest | ||
docker run --rm ghcr.io/pplmx/setup-me-action:${GITHUB_REF_NAME:1} | ||
- | ||
name: Build and Push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
ghcr.io/pplmx/setup-me-action:latest | ||
ghcr.io/pplmx/setup-me-action:${GITHUB_REF_NAME:1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Labeler | ||
|
||
on: | ||
- pull_request | ||
- issues | ||
|
||
jobs: | ||
labeler: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: srvaroa/labeler@master | ||
with: | ||
config_path: .github/configs/labeler.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm test | ||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
|
||
- support some features | ||
|
||
### Changed | ||
|
||
- change some existed behaviors/logic | ||
|
||
### Fixed | ||
|
||
- fix some bugs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Code of Conduct | ||
|
||
This project adheres to the TypeScript Code of Conduct, which can be found [here](https://google.github.io/styleguide/tsguide.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Contribution guidelines | ||
|
||
First off, thank you for considering contributing to `setup-me-action`. | ||
|
||
If your contribution is not straightforward, please first discuss the change you | ||
wish to make by creating a new issue before making the change. | ||
|
||
## Reporting issues | ||
|
||
Before reporting an issue on the | ||
[issue tracker](https://github.com/pplmx/setup-me-action/issues), | ||
please check that it has not already been reported by searching for some related | ||
keywords. | ||
|
||
## Pull requests | ||
|
||
Try to do one pull request per change. | ||
|
||
### Updating the changelog | ||
|
||
Update the changes you have made in | ||
[CHANGELOG](CHANGELOG.md) | ||
file under the **Unreleased** section. | ||
|
||
Add the changes of your pull request to one of the following subsections, | ||
depending on the types of changes defined by | ||
[Keep a changelog](https://keepachangelog.com/en/1.0.0/): | ||
|
||
- `Added` for new features. | ||
- `Changed` for changes in existing functionality. | ||
- `Deprecated` for soon-to-be removed features. | ||
- `Removed` for now removed features. | ||
- `Fixed` for any bug fixes. | ||
- `Security` in case of vulnerabilities. | ||
|
||
If the required subsection does not exist yet under **Unreleased**, create it! | ||
|
||
## Developing | ||
|
||
### Set up | ||
|
||
This is no different from other Python projects. | ||
|
||
```shell | ||
git clone https://github.com/pplmx/setup-me-action | ||
cd setup-me-action | ||
make test | ||
``` | ||
|
||
### Useful Commands |
Oops, something went wrong.