Skip to content

Commit 32dcd99

Browse files
committed
feat: initial commit
0 parents  commit 32dcd99

File tree

76 files changed

+3200
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3200
-0
lines changed

.github/CONTRIBUTING.md

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish to make via
4+
[GitHub issues](https://github.com/refinedmods/refinedarchitect-template/issues), [Discord](https://discordapp.com/invite/VYzsydb),
5+
or any other method with the owners of this repository before making a change.
6+
7+
## Pull requests
8+
9+
- Keep your pull request (PR) as small as possible, this makes reviewing easier.
10+
- Commits serve a clear purpose and have a fitting commit message.
11+
- Branches are kept up to date by rebasing (updating a branch by merging makes for a confusing Git history).
12+
- PRs are merged by merging the commits on top of the target branch (which is `develop`).
13+
- Remember to add your changes in `CHANGELOG.md`. If your changes are merely technical, it's not necessary to update the
14+
changelog as it's not relevant for users.
15+
16+
### Commit messages
17+
18+
Commit messages must adhere to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). We
19+
use [Commitlint](https://commitlint.js.org/) to validate commit messages.
20+
21+
We use
22+
the [conventional configuration](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional)
23+
for Commitlint.
24+
25+
It is recommended to install
26+
the [Conventional Commit plugin](https://plugins.jetbrains.com/plugin/13389-conventional-commit) to make it
27+
easier to write commit messages.
28+
29+
### Branch names
30+
31+
Because we use merge commits when merging a PR, branch names will be part of the history of the repository. That is why
32+
branch names must follow a certain standard.
33+
34+
The format is `{category}/GH-{issue number}/{lowercase-description}` and a branch name can be maximum 50 characters of
35+
length.
36+
37+
Category must match a
38+
category [used in our Commitlint config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum).
39+
40+
Valid examples are:
41+
42+
- `fix/GH-123/add-branch-linting`
43+
- `docs/GH-123/cleanup`
44+
45+
## Versioning
46+
47+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
48+
49+
### Version metadata
50+
51+
The code doesn't contain version metadata: `build.gradle` specifies a version of `0.0.0` (via Refined Architect).
52+
The versioning information is entirely contained in Git by using tags.
53+
54+
Per [Semantic Versioning](https://semver.org/spec/v2.0.0.html), the version number being released depends on the changes
55+
in that release. We usually can't predict those
56+
changes at the start of a release cycle, so we can't bump the version at the start of a release cycle. That means that
57+
the version number being released is determined at release time.
58+
59+
Because the version number is determined at release time, we can't store any versioning metadata in the
60+
code (`build.gradle`). If we did, `build.gradle` would have the version number of the latest released version during the
61+
release cycle of the new version, which isn't correct.
62+
63+
## Changelog
64+
65+
The changelog is kept in `CHANGELOG.md`.
66+
67+
Keeping a readable, relevant and user-friendly changelog is essential for our end users
68+
to stay up to date with the project.
69+
70+
Please refrain from using technical terminology or adding entries for technical changes
71+
that are (generally) not relevant to the end-user.
72+
73+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
74+
75+
## Gitflow
76+
77+
This project uses [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
78+
79+
## Code style
80+
81+
We use [Checkstyle](https://checkstyle.sourceforge.io/) in our build workflow to validate coding style.
82+
83+
It is recommended to import the [config/checkstyle/checkstyle.xml](../config/checkstyle/checkstyle.xml) file into your
84+
IDE, so that formatting rules are respected.
85+
86+
Moreover, the [CheckStyle-IDEA plugin](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) can be used to check
87+
if there are no style violations.
88+
89+
## Release process
90+
91+
The release process is automated and follows Gitflow.
92+
93+
Before running the "Draft release" workflow to start the release process make sure `CHANGELOG.md` contains all the
94+
unreleased changes.
95+
96+
To determine the version number to be released, the workflow will ask you which release type this is (major, minor,
97+
patch).
98+
The latest version from `CHANGELOG.md` will be used as a base, and that will be incremented
99+
depending on the release type.
100+
101+
`CHANGELOG.md` will be updated by this workflow, you can review this in the resulting release PR.
102+
103+
If you merge the release PR, the "Publish release" workflow will automatically publish the release. An additional PR
104+
will be created to merge the changes in `CHANGELOG.md` back into `develop`.
105+
106+
## Hotfix process
107+
108+
The hotfix process is semi-automated and follows Gitflow:
109+
110+
- Create a hotfix branch off `main`.
111+
- Commit your changes on this branch.
112+
- Update `CHANGELOG.md` (with version number and release date) manually on this branch.
113+
- Push the branch and create a PR for it, merging into `main`.
114+
115+
The "Publish release" workflow will take care of the rest.
116+
117+
## Workflows
118+
119+
We have a few GitHub workflows:
120+
121+
- Build (PRs, pushes to `develop` and `main`)
122+
- Draft release (manual trigger)
123+
- Publish release (merging a PR to `main`)
124+
- Validate changelog (PRs)
125+
- To validate if `CHANGELOG.md` is valid and updated.
126+
- Not every pull request needs a changelog change, so the `skip-changelog` label can be added to the pull request to
127+
ignore this.
128+
- Validate commit messages (PRs)
129+
- Validates whether the commits on a pull request
130+
respect [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
131+
- We use
132+
the [conventional configuration](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
133+
- Validate branch names (PRs)
134+
- Issue for unsupported version (issues)
135+
- Posts a message on a GitHub issue if the issue is about an unsupported version.
136+
- Lock resolved issues and PRs (every night)
137+
138+
### Build
139+
140+
The build workflow triggers when a pull request is updated or when a commit is pushed to `develop` or `main`.
141+
142+
The build workflow takes care of the following:
143+
144+
- Running a Gradle build.
145+
- Code style validation with Checkstyle.
146+
- Uploading the artifacts on the action.
147+
148+
### Draft release
149+
150+
The draft release workflow is a manual workflow which will create a release branch from `develop`.
151+
152+
To determine the version number to be released, it will extract the latest version number from `CHANGELOG.md` and
153+
increment it depending on the release type selected.
154+
155+
This workflow takes care of the following:
156+
157+
- Creating the release branch.
158+
- Updating the changelog on this release branch.
159+
- Creating a pull request merging the release branch into `main`.
160+
161+
### Publish release
162+
163+
The "publish release" workflow is triggered when a release or hotfix PR is merged to `main`. Usually, this will be the
164+
PR created earlier in the "Draft release" workflow.
165+
166+
The workflow takes care of the following:
167+
168+
- Extracting the version number from the release or hotfix branch name that is merged in the PR.
169+
- Extracting the changelog entry for this version number.
170+
- Running a build.
171+
- Publishing on [GitHub packages](https://github.com/refinedmods/refinedarchitect-template/packages) and
172+
CreeperHost Maven.
173+
- Publishing Javadoc on [GitHub pages](https://github.com/refinedmods/refinedarchitect-template/tree/gh-pages).
174+
- Deploying on [GitHub releases](https://github.com/refinedmods/refinedarchitect-template/releases).
175+
- Announcing the release on Discord and Twitter.
176+
- Creating a PR that merges `main` back into `develop` to get the changes to `CHANGELOG.md` and `build.gradle`
177+
into `develop` from the draft release workflow.

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patreon: raoulvdberge

.github/ISSUE_TEMPLATE/bug-report.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Bug report
2+
description: Found a bug or encountered a crash? Please report it here.
3+
labels: [ bug ]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Provide a summary of the issue in the title above.
9+
- type: textarea
10+
id: description
11+
attributes:
12+
label: Describe the bug
13+
description: |
14+
Be as detailed as possible.
15+
If applicable, also tell us what you expected to happen instead.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: reproduce
20+
attributes:
21+
label: How can we reproduce this bug or crash?
22+
description: |
23+
Provide us with steps on how to reproduce this issue.
24+
placeholder: |
25+
1.
26+
2.
27+
3.
28+
validations:
29+
required: true
30+
- type: dropdown
31+
id: minecraft
32+
attributes:
33+
label: What Minecraft version is this happening on?
34+
description: |
35+
If your Minecraft version isn't listed here, it means that it's no longer supported. In that case, don't create an issue.
36+
options:
37+
- Minecraft 1.19.3
38+
validations:
39+
required: true
40+
- type: input
41+
id: modloader-version
42+
attributes:
43+
label: What Forge or Fabric version is this happening on?
44+
validations:
45+
required: true
46+
- type: input
47+
id: version
48+
attributes:
49+
label: What version is this happening on?
50+
description: |
51+
Ensure that you are using the latest version.
52+
validations:
53+
required: true
54+
- type: textarea
55+
id: logs
56+
attributes:
57+
label: Relevant log output
58+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
59+
render: shell

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Discord Community Support
4+
url: https://discordapp.com/invite/VYzsydb
5+
about: Please ask and answer questions here. Issues should be used for bugs and feature requests.
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Enhancement
2+
description: Do you have a suggestion for a new feature or improvement? Let us know.
3+
labels: [ enhancement ]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Provide a summary of the enhancement in the title above.
9+
10+
Please follow following guidelines before proposing an enchancement:
11+
1) Ensure that you are running on the latest version (to ensure that the enhancement does not exist yet).
12+
2) Ensure that your enhancement hasn't already been posted. Please look in the closed issues as well (for enhancements that have been denied).
13+
14+
We might close your issue, without explanation, if you do not follow these guidelines.
15+
- type: textarea
16+
id: describe
17+
attributes:
18+
label: Describe your enhancement
19+
description: |
20+
Be as detailed as possible.
21+
Tell us how your idea should work. Why should we consider this?
22+
validations:
23+
required: true

.github/SUPPORT.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Support
2+
3+
If you have a problem and need help, we offer various channels where you can ask for help.
4+
5+
## I have a question
6+
7+
Questions can be asked on [Discord](https://discordapp.com/invite/VYzsydb).
8+
9+
## I have found a bug
10+
11+
If you have found a bug, please report it on [GitHub issues](https://github.com/refinedmods/refinedarchitect-template/issues).

.github/workflows/build.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- main
7+
pull_request:
8+
types: [ opened, synchronize, reopened ]
9+
jobs:
10+
build:
11+
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]
12+
with:
13+
mutation-testing: false
14+
sonarqube: false
15+
secrets: inherit

.github/workflows/draft-release.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Draft release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release-type:
6+
description: 'Release type'
7+
required: true
8+
default: 'minor'
9+
type: choice
10+
options:
11+
- major
12+
- minor
13+
- patch
14+
version-number-override:
15+
description: 'Version number override'
16+
required: false
17+
type: string
18+
jobs:
19+
draft:
20+
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]
21+
with:
22+
release-type: ${{ inputs.release-type }}
23+
version-number-override: ${{ inputs.version-number-override }}
24+
secrets: inherit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Issue for unsupported version
2+
on:
3+
issues:
4+
types: [ labeled, unlabeled, reopened ]
5+
jobs:
6+
unsupported-labeler:
7+
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]

.github/workflows/publish-release.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Publish release
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
types:
7+
- closed
8+
jobs:
9+
publish-release:
10+
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]
11+
secrets: inherit
12+
with:
13+
project-name: 'Refined Sites'
14+
announce: false
15+
mutation-testing: false
16+
sonarqube: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Lock resolved issues and PRs
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *'
5+
jobs:
6+
lock:
7+
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: Validate branch name
2+
on: [ pull_request ]
3+
jobs:
4+
validate-branch-name:
5+
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: Validate changelog
2+
on:
3+
pull_request:
4+
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]
5+
jobs:
6+
validate-changelog:
7+
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: Validate commit messages
2+
on: [ pull_request ]
3+
jobs:
4+
validate-commit-messages:
5+
uses: refinedmods/refinedarchitect/.github/workflows/[email protected]

0 commit comments

Comments
 (0)