Skip to content

Commit

Permalink
feat: add contribution docs and release ci (LimeChain#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
ablax authored Mar 27, 2024
1 parent c7940ed commit 0c7419f
Show file tree
Hide file tree
Showing 7 changed files with 307 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Bug Report
description: Let us know about an issue you experienced with this software
body:
- type: checkboxes
attributes:
label: Is there an existing issue?
description: Please search to see if an issue already exists and leave a comment that you also experienced this issue or add your specifics that are related to an existing issue.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: bug
attributes:
label: Description of bug
description: What seems to be the problem?
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Provide the steps that led to the discovery of the issue.
validations:
required: false
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Feature Request
description: Submit your requests and suggestions to improve!
body:
- type: checkboxes
id: existing
attributes:
label: Is there an existing issue?
description: Please search to see if an issue already exists and leave a comment that you also experienced this issue or add your specifics that are related to an existing issue.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Please give precedence as to what lead you to file this issue.
validations:
required: false
- type: textarea
id: request
attributes:
label: Request
description: Please describe what is needed.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution
description: If possible, please describe what a solution could be.
validations:
required: false
- type: dropdown
id: help
attributes:
label: Are you willing to help with this request?
multiple: true
options:
- Yes!
- No.
- Maybe (please elaborate above)
validations:
required: true
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Description

*Please include a summary of the changes and the related issue. Please also include relevant motivation and context,
including:*

- What does this PR do?
- Why are these changes needed?
- How were these changes implemented and what do they affect?

*Use [Github semantic linking](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) to address any open issues this PR relates to or closes.*

Fixes #<issue number, if applicable>

## Checklist:
- [ ] I have read the [contributing guidelines](../CONTRIBUTING.md).
- [ ] My PR title matches the [Conventional Commits spec](https://www.conventionalcommits.org/).
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
on:
push:
tags:
- '*' # Push events to matching v*, i.e. 1.0, 20.15.10

name: Release version

jobs:
release-version:
if: startsWith(github.ref, 'refs/tags/')
name: Release version ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
- name: Write release version
run: |
VERSION=${GITHUB_REF_NAME}
echo Releasing version: $VERSION
sed -i -e 's@version = .\d*.\d*.\d*.*@version = "'"$VERSION"'"@g' build.gradle.kts
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
- name: Build Changelog
id: changelog
uses: requarks/changelog-action@v11
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.changelog.outputs.changes }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/libs/Fruzhin-${{ github.ref_name }}.jar
asset_name: Fruzhin-${{ github.ref_name }}.jar
asset_content_type: application/java-archive
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
hi[et]limechain[dot]tech.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing

Thank you for considering contributing to Fruzhin! We welcome contributions from everyone. To maintain a high standard of quality, please follow these guidelines when contributing to the project.

## Commit Message Guidelines

We follow the [Conventional Commits specification](https://www.conventionalcommits.org/) for our commit messages. Each commit message should have a clear and structured format that conveys the type, scope, and description of the changes made. This helps in understanding the purpose of each commit and automating tasks like versioning and changelog generation.

## Merge Process

When submitting a new pull request (PR), please ensure the following:

- **Target the `dev` branch**: All new PRs must target the `dev` branch.
- **Use our PR template**: Utilize our [PR template](https://github.com/limechain/Fruzhin/tree/dev/.github/PULL_REQUEST_TEMPLATE.md) to ensure all necessary information is included.
- **Pass the tests**: Ensure that all tests are passing.
- **Update the docs**: Ensure that all relevant changes are reflected in the docs.
- **Have 2 approvals from the core dev team**: PRs should have approvals from at least two members of the core development team before merging.

Additional recommendations:
- Write tests for logic related to modules.

## Release Process

We use the `dev` branch for ongoing development. Once the development is complete and ready for release, changes are merged into the `master` branch.

0 comments on commit 0c7419f

Please sign in to comment.