Skip to content

Commit 09c9d00

Browse files
First version
0 parents  commit 09c9d00

27 files changed

+3835
-0
lines changed

.github/RELEASE.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Release Process
2+
3+
This document describes how to create a new release of JToon.
4+
5+
## Automated Release via GitHub Actions
6+
7+
The project uses GitHub Actions to automatically build and release when a version tag is pushed.
8+
9+
### Steps to Create a Release
10+
11+
1. **Update the version in `build.gradle`**
12+
13+
```gradle
14+
version = '1.0' // Update to your new version
15+
```
16+
17+
2. **Commit the version change**
18+
19+
```bash
20+
git add build.gradle
21+
git commit -m "Bump version to 1.0"
22+
git push
23+
```
24+
25+
3. **Create and push a version tag**
26+
27+
```bash
28+
git tag v1.0
29+
git push origin v1.0
30+
```
31+
32+
4. **Wait for the workflow to complete**
33+
- The GitHub Actions workflow will automatically:
34+
- Build the project
35+
- Run all tests
36+
- Create a GitHub release
37+
- Attach the JAR file to the release
38+
- Generate release notes from commits
39+
40+
### Release Artifacts
41+
42+
The release will include:
43+
44+
- `JToon-{version}.jar` - Main library JAR
45+
- Automatically generated release notes
46+
47+
### Pre-release Versions
48+
49+
If your version contains a dash (e.g., `1.0-SNAPSHOT`, `2.0-beta`), the release will be marked as a pre-release automatically.
50+
51+
### Version Tag Format
52+
53+
Use semantic versioning with a `v` prefix:
54+
55+
- `v1.0` - Major release
56+
- `v1.0.0` - Patch release
57+
- `v1.0-SNAPSHOT` - Snapshot/pre-release
58+
- `v2.0-beta` - Beta release
59+
60+
## Continuous Integration
61+
62+
Every push to `main`, `master`, or `develop` branches, and every pull request, triggers the build workflow which:
63+
64+
- Compiles the code
65+
- Runs all tests
66+
- Generates test reports
67+
- Creates build artifacts
68+
69+
Check the build status badges in the README for the current build state.

.github/og.png

24.1 KB
Loading

.github/workflows/build.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- develop
9+
pull_request:
10+
branches:
11+
- main
12+
- master
13+
- develop
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up JDK 21
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: '21'
27+
distribution: 'temurin'
28+
cache: 'gradle'
29+
30+
- name: Grant execute permission for gradlew
31+
run: chmod +x gradlew
32+
33+
- name: Build with Gradle
34+
run: ./gradlew build
35+
36+
- name: Upload test results
37+
uses: actions/upload-artifact@v4
38+
if: always()
39+
with:
40+
name: test-results
41+
path: build/reports/tests/test/
42+
retention-days: 7
43+
44+
- name: Upload build artifacts
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: build-artifacts
48+
path: build/libs/*.jar
49+
retention-days: 7
50+

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up JDK 21
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: '21'
22+
distribution: 'temurin'
23+
cache: 'gradle'
24+
25+
- name: Grant execute permission for gradlew
26+
run: chmod +x gradlew
27+
28+
- name: Build with Gradle
29+
run: ./gradlew build
30+
31+
- name: Extract version from tag
32+
id: get_version
33+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
34+
35+
- name: Create GitHub Release
36+
uses: softprops/action-gh-release@v1
37+
with:
38+
files: build/libs/*.jar
39+
generate_release_notes: true
40+
draft: false
41+
prerelease: ${{ contains(steps.get_version.outputs.VERSION, '-') }}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Upload build artifacts
46+
uses: actions/upload-artifact@v4
47+
if: always()
48+
with:
49+
name: build-artifacts
50+
path: |
51+
build/libs/*.jar
52+
build/reports/tests/test/
53+
retention-days: 30
54+

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
.kotlin
7+
8+
### IntelliJ IDEA ###
9+
.idea/modules.xml
10+
.idea/jarRepositories.xml
11+
.idea/compiler.xml
12+
.idea/libraries/
13+
*.iws
14+
*.iml
15+
*.ipr
16+
out/
17+
!**/src/main/**/out/
18+
!**/src/test/**/out/
19+
20+
### Eclipse ###
21+
.apt_generated
22+
.classpath
23+
.factorypath
24+
.project
25+
.settings
26+
.springBeans
27+
.sts4-cache
28+
bin/
29+
!**/src/main/**/bin/
30+
!**/src/test/**/bin/
31+
32+
### NetBeans ###
33+
/nbproject/private/
34+
/nbbuild/
35+
/dist/
36+
/nbdist/
37+
/.nb-gradle/
38+
39+
### VS Code ###
40+
.vscode/
41+
42+
### Mac OS ###
43+
.DS_Store

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/aws.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)