Skip to content

Commit

Permalink
Merge pull request #58 from wayofdev/feat/refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp authored Apr 17, 2024
2 parents c68667c + fdb97ac commit 4c84daf
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 2 deletions.
28 changes: 27 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,25 @@ $ make help
- **Fork the Repository**: Start by forking the repository to your GitHub account.
- **Create a Branch**: In your fork, create a new branch for your work. Name it appropriately based on the feature, fix, or update you're working on.
- **Make Your Changes**: Implement your changes, commit them, and push the branch to your fork.
- **Make Your Changes**: Implement your changes
- **Update Documentation**: If you've made changes that affect the project's documentation, ensure it is updated.
- **Run Linters**: Ensure your code passes all linting checks using `make lint`.
- **Commit Your Changes**: Use the [Conventional Commits](#-commit-message-guidelines) standard for your commit messages. You can use `make commit` to assist in creating commit messages.
- **Push Your Changes**: Push your branch to your fork on GitHub.
- **Open a Pull Request**: Submit a pull request to the `master` branch of the original repository. Ensure your PR is focused, addressing a single feature, fix, or improvement.

<br>

## ⚡️ Continuous Integration with GitHub Actions

Our project employs [GitHub Actions](https://github.com/features/actions) for continuous integration, ensuring code quality and reliability. We encourage contributors to review our workflow configurations to understand the CI processes:

- [`workflows/integrate.yaml`](workflows/integrate.yaml)
- [`workflows/triage.yml`](workflows/triage.yml)
- [`workflows/release.yml`](workflows/create-arch-diagram.yml)

<br>

## ✉️ Commit Message Guidelines

We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard. Please structure your commit messages as follows, using the appropriate prefix:
Expand Down Expand Up @@ -100,6 +114,18 @@ $ make lint-yaml

by default, [`cytopia/yamllint`](https://github.com/cytopia/docker-yamllint) Docker image will be used to run linter.

### → Action Lint

We use [`actionlint`](https://github.com/rhysd/actionlint) to enforce coding standards in GitHub Actions workflows.

To lint GitHub Actions run:

```bash
$ make lint-actions
```

by default, [`rhysd/actionlint`](https://hub.docker.com/r/rhysd/actionlint/tags) Docker image will be used to run linter.

<br>

## 📦 Pre-commit Hooks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-changesets-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: 📦 Check out the codebase
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:
```
</details>

Real-world examples can be found in the [`wayofdev/laravel-package-tpl`](https://github.com/wayofdev/laravel-package-tpl/blob/master/.github/workflows/apply-labels.yml) repository.

<br>

Expand Down Expand Up @@ -176,6 +177,45 @@ jobs:
```
</details>

Real-world examples can be found in the [`wayofdev/laravel-package-tpl`](https://github.com/wayofdev/laravel-package-tpl/blob/master/.github/workflows/auto-merge-release.yml) repository.

<br>

#### `create-changesets-release.yml:`

This workflow creates a release based on changesets. This workflow utilizes [changesets/action](https://github.com/changesets/action) to create a release based on changesets.

Here is an example of how to use this workflow:

<details>
<summary><code>.github/workflows/create-changesets-release.yml</code></summary>

```yaml
---
on: # yamllint disable-line rule:truthy
push:
branches:
- master

name: 🦋 Create release or publish to pnpm

jobs:
release:
uses: wayofdev/gh-actions/.github/workflows/create-changesets-release.yml@master
with:
node: 18
repository: wayofdev/next-starter-tpl
secrets:
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}

...
```
</details>

Real-world examples can be found in the [`wayofdev/next-starter-tpl`](https://github.com/wayofdev/next-starter-tpl/blob/master/.github/workflows/create-changesets-release.yml) repository.

<br>

### → Docker Workflows
Expand Down Expand Up @@ -246,6 +286,8 @@ jobs:
```
</details>

Real-world examples can be found in the [`wayofdev/docker-node`](https://github.com/wayofdev/docker-node/blob/master/.github/workflows/build-release.yml) repository.

<br>

### → Code Architecture
Expand Down Expand Up @@ -291,6 +333,8 @@ jobs:
```
</details>

Real-world examples can be found in the [`wayofdev/laravel-package-tpl`](https://github.com/wayofdev/laravel-package-tpl/blob/master/.github/workflows/create-arch-diagram.yml) repository.

<br>

### → Static Analysis
Expand Down Expand Up @@ -328,6 +372,8 @@ jobs:
```
</details>

Real-world examples can be found in the [`wayofdev/laravel-package-tpl`](https://github.com/wayofdev/laravel-package-tpl/blob/master/.github/workflows/shellcheck.yml) repository.

<br>

## 🤝 License
Expand Down

0 comments on commit 4c84daf

Please sign in to comment.