Skip to content

Commit 2077f9d

Browse files
committed
Signed-off-by: 秋雨落 <i@rain.cx>
1 parent d80226c commit 2077f9d

254 files changed

Lines changed: 12380 additions & 0 deletions

File tree

Some content is hidden

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

.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
mod-release:
7+
required: true
8+
type: boolean
9+
default: true
10+
upload-artifacts:
11+
required: false
12+
type: boolean
13+
default: true
14+
workflow_dispatch:
15+
inputs:
16+
mod-release:
17+
required: true
18+
type: boolean
19+
default: false
20+
description: Release mode
21+
upload-artifacts:
22+
required: true
23+
type: boolean
24+
default: true
25+
description: Upload build artifacts
26+
27+
jobs:
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
34+
- name: Validate gradlew
35+
uses: gradle/actions/wrapper-validation@v5
36+
37+
- name: Setup JDK 21
38+
uses: actions/setup-java@v3
39+
with:
40+
distribution: 'temurin'
41+
java-version: 21
42+
cache: 'gradle'
43+
44+
- name: Setup Gradle
45+
uses: gradle/actions/setup-gradle@v4
46+
47+
- name: Build with Gradle
48+
env:
49+
MOD_RELEASE: ${{ inputs.mod-release }}
50+
MOD_CI: true
51+
MOD_CI_BUILD_NUMBER: ${{ github.run_number }}
52+
run: |
53+
chmod +x ./gradlew
54+
./gradlew build
55+
56+
- name: Upload artifacts
57+
uses: actions/upload-artifact@v4
58+
if: inputs.upload-artifacts
59+
with:
60+
name: 'build'
61+
path: |
62+
build/libs
63+
fabric/build/libs
64+
neoforge/build/libs
65+
retention-days: 7

.github/workflows/check.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Build check
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
uses: ./.github/workflows/build.yml
10+
with:
11+
mod-release: 'false'
12+
upload-artifacts: 'false'

.github/workflows/weekly_build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Weekly build
2+
on:
3+
schedule:
4+
- cron: "0 0 * * 6"
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
uses: ./.github/workflows/build.yml
10+
with:
11+
mod-release: 'false'
12+
upload-artifacts: 'true'
13+
14+
upload:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Download artifact
18+
uses: actions/download-artifact@v5
19+
with:
20+
name: 'build'
21+
path: 'output'
22+
- run: ls -R output
23+
24+
- name: Publish
25+
uses: softprops/action-gh-release@v2
26+
with:
27+
draft: false
28+
prerelease: true
29+
generate_release_notes: true
30+
preserve_order: true
31+
tag_name: '${{ github.ref_name }}-snapshot'
32+
name: "Weekly build #${{ github.run_number }}"
33+
files: |
34+
output/**/*@(.[0-9]|-SNAPSHOT).jar

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
build/
2+
*.ipr
3+
run/
4+
*.iws
5+
out/
6+
*.iml
7+
.gradle/
8+
output/
9+
bin/
10+
libs/
11+
12+
.classpath
13+
.project
14+
.idea/
15+
classes/
16+
.metadata
17+
.vscode
18+
.settings
19+
*.launch
20+
21+
.architectury-transformer/

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 华夏核心 / SinoCore
2+
3+
> 青,取之于蓝,而青于蓝;冰,水为之,而寒于水。
4+
>
5+
> Although blue comes from the indigo plant, it is bluer than indigo;
6+
> and ice is made of water, but it is colder than water.
7+
8+
华夏系列通用代码库。
9+
Common library of SinoSeries Mods.

0 commit comments

Comments
 (0)