Skip to content

Commit 6ae3617

Browse files
committed
chore(github): add issue templates, CI config, and contributing guide
- add bug report issue template - add feature request issue template - add pull request template - add github actions workflow for building and deploying - add contributing guide - add license file - update README with installation and usage instructions
1 parent 695ef6f commit 6ae3617

File tree

9 files changed

+482
-0
lines changed

9 files changed

+482
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve the plugin
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Environment:**
26+
27+
- OS: [e.g. Windows 11, macOS Sonoma]
28+
- Eclipse Version: [e.g. 2024-09 (4.33)]
29+
- Plugin Version: [e.g. 1.0.0]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: "[FEAT] "
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. "I'm always frustrated when..."
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Description of the Change
2+
3+
<!--
4+
A clear and concise description of what this pull request is about.
5+
If it's a new theme, mention the name of the theme.
6+
If it fixes a bug, link to the issue.
7+
-->
8+
9+
### Related Issue
10+
11+
<!--
12+
Link to the issue that this PR addresses.
13+
e.g. "Fixes #123"
14+
-->
15+
16+
### Checklist
17+
18+
- [ ] I have read the [**CONTRIBUTING.md**](https://github.com/ahatem/eclipse-themes-plugin/blob/main/CONTRIBUTING.md) document.
19+
- [ ] My code builds successfully with `mvn clean verify`.
20+
- [ ] I have tested my changes in a running Eclipse instance.

.github/workflows/build.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
release:
9+
types: [created]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Step 1: Get the code
17+
- uses: actions/checkout@v4
18+
19+
# Step 2: Set up the environment
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v3
22+
with:
23+
java-version: "17"
24+
distribution: "temurin"
25+
26+
# Step 3: Speed up the build
27+
- name: Cache Maven dependencies
28+
uses: actions/cache@v3
29+
with:
30+
path: ~/.m2
31+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
32+
restore-keys: ${{ runner.os }}-m2
33+
34+
# Step 4: Run the build command
35+
- name: Build with Maven
36+
run: mvn clean verify -B
37+
38+
# Step 5: Save the result
39+
- name: Upload build artifacts
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: eclipse-themes-updatesite
43+
path: releng/com.github.eclipsethemes.updatesite/target/repository/
44+
retention-days: 90
45+
46+
# --- JOB 2: Deploy the Update Site to a live website ---
47+
deploy-updatesite:
48+
# This job depends on the 'build' job. It will only start if 'build' finishes successfully.
49+
needs: build
50+
runs-on: ubuntu-latest
51+
# VERY IMPORTANT: This job will ONLY run if the event that triggered the workflow was a
52+
# push to the 'main' branch. This prevents test branches from overwriting your official website.
53+
if: github.ref == 'refs/heads/main'
54+
55+
steps:
56+
# Step 1: Get the code (needed for the deployment action)
57+
- uses: actions/checkout@v4
58+
59+
# Step 2: Get the result from the 'build' job
60+
- name: Download build artifacts
61+
uses: actions/download-artifact@v3
62+
with:
63+
name: eclipse-themes-updatesite
64+
path: updatesite/
65+
66+
# Step 3: Publish to GitHub Pages
67+
- name: Deploy to GitHub Pages
68+
uses: peaceiris/actions-gh-pages@v3
69+
with:
70+
github_token: ${{ secrets.GITHUB_TOKEN }}
71+
publish_dir: ./updatesite
72+
publish_branch: gh-pages
73+
74+
# --- JOB 3: Create a downloadable .zip file for a release ---
75+
create-release:
76+
needs: build
77+
runs-on: ubuntu-latest
78+
# VERY IMPORTANT: This job will ONLY run if the event that triggered the workflow was
79+
# the creation of a new Release on GitHub's release page.
80+
if: github.event_name == 'release'
81+
82+
steps:
83+
# Step 1: Get the code
84+
- uses: actions/checkout@v4
85+
86+
# Step 2: Get the result from the 'build' job
87+
- name: Download build artifacts
88+
uses: actions/download-artifact@v3
89+
with:
90+
name: eclipse-themes-updatesite
91+
path: updatesite/
92+
93+
# Step 3: Package the result
94+
- name: Create release archive
95+
run: |
96+
cd updatesite
97+
zip -r ../eclipse-themes-updatesite-${{ github.event.release.tag_name }}.zip .
98+
cd ..
99+
100+
# Step 4: Attach the .zip file to the release page
101+
- name: Upload release asset
102+
uses: actions/upload-release-asset@v1
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
with:
106+
upload_url: ${{ github.event.release.upload_url }}
107+
asset_path: eclipse-themes-updatesite-${{ github.event.release.tag_name }}.zip
108+
asset_name: eclipse-themes-updatesite-${{ github.event.release.tag_name }}.zip
109+
asset_content_type: application/zip

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing to Eclipse Themes
2+
3+
Thank you for your interest in contributing to this project! We welcome all contributions, from bug reports and feature suggestions to new theme submissions and code improvements.
4+
5+
## How to Contribute
6+
7+
### Reporting Bugs
8+
9+
If you find a bug, please [open an issue](https://github.com/ahatem/eclipse-themes-plugin/issues/new?template=bug_report.md) on our GitHub repository. A great bug report includes:
10+
11+
- A clear and descriptive title.
12+
- Steps to reproduce the bug.
13+
- What you expected to happen vs. what actually happened.
14+
- Your Eclipse version and operating system.
15+
16+
### Suggesting Enhancements
17+
18+
Have an idea for a new feature? We'd love to hear it. [Open an issue](https://github.com/ahatem/eclipse-themes-plugin/issues/new?template=feature_request.md) and describe your suggestion.
19+
20+
### Pull Requests for Code Changes
21+
22+
1. Fork the repository and create a new branch from `main`.
23+
2. Make your changes, adhering to the existing code style.
24+
3. Ensure the project builds successfully using the command below.
25+
4. Submit a pull request with a clear description of your changes and why they are needed.
26+
27+
## Development Setup
28+
29+
To build and run the plugin locally, you will need:
30+
31+
- JDK 17 or higher
32+
- Maven 3.9.0 or higher
33+
34+
Clone your forked repository and run the following command from the root directory to build the project:
35+
36+
```bash
37+
mvn clean verify
38+
```
39+
40+
This will compile the code, run tests, and create a local update site in `releng/com.github.eclipsethemes.updatesite/target/repository`. You can then install the plugin from this local site into your development Eclipse instance to test your changes.

0 commit comments

Comments
 (0)