Skip to content

Commit 393afac

Browse files
committed
feat:init repo
Signed-off-by: grapebaba <281165273@qq.com>
0 parents  commit 393afac

52 files changed

Lines changed: 5468 additions & 0 deletions

Some content is hidden

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

‎.github/badges/branches.svg‎

Lines changed: 1 addition & 0 deletions
Loading

‎.github/badges/jacoco.svg‎

Lines changed: 1 addition & 0 deletions
Loading

‎.github/workflows/build.yml‎

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: mev-share-java CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
macos:
9+
name: macOS
10+
runs-on: [ macos-latest ]
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: 17
18+
distribution: 'temurin'
19+
20+
- name: Setup Gradle
21+
uses: gradle/gradle-build-action@v2
22+
23+
- name: Execute Gradle build
24+
env:
25+
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
26+
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL }}
27+
run: ./gradlew build
28+
29+
windows:
30+
name: windows
31+
runs-on: [ windows-latest ]
32+
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: Set up JDK 17
36+
uses: actions/setup-java@v3
37+
with:
38+
java-version: 17
39+
distribution: 'temurin'
40+
41+
- name: Setup Gradle
42+
uses: gradle/gradle-build-action@v2
43+
44+
- name: Execute Gradle build
45+
env:
46+
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
47+
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL }}
48+
run: ./gradlew build
49+
50+
linux:
51+
name: linux
52+
runs-on: [ ubuntu-latest ]
53+
54+
steps:
55+
- uses: actions/checkout@v3
56+
- name: Set up JDK 17
57+
uses: actions/setup-java@v3
58+
with:
59+
java-version: 17
60+
distribution: 'temurin'
61+
62+
- name: Setup Gradle
63+
uses: gradle/gradle-build-action@v2
64+
65+
- name: Execute Gradle build
66+
env:
67+
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
68+
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL }}
69+
run: ./gradlew build
70+
71+
- name: Generate JaCoCo Badge
72+
uses: cicirello/jacoco-badge-generator@v2
73+
with:
74+
generate-branches-badge: true
75+
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv
76+
77+
- name: Log coverage percentage
78+
run: |
79+
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
80+
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
81+
82+
- name: Commit and push the badge (if it changed)
83+
uses: EndBug/add-and-commit@v7
84+
with:
85+
default_author: github_actor
86+
message: 'commit badge'
87+
add: '*.svg'
88+
89+
- name: Upload JaCoCo coverage report
90+
uses: actions/upload-artifact@v2
91+
with:
92+
name: jacoco-report
93+
path: build/reports/jacoco/

‎.github/workflows/pull_request.yml‎

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: mev-share-java pull request CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
macos:
8+
name: macOS
9+
runs-on: [ macos-latest ]
10+
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up JDK 17
14+
uses: actions/setup-java@v3
15+
with:
16+
java-version: 17
17+
distribution: 'temurin'
18+
19+
- name: Setup Gradle
20+
uses: gradle/gradle-build-action@v2
21+
22+
- name: Execute Gradle build
23+
env:
24+
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
25+
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL }}
26+
run: ./gradlew build
27+
28+
windows:
29+
name: windows
30+
runs-on: [ windows-latest ]
31+
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Set up JDK 17
35+
uses: actions/setup-java@v3
36+
with:
37+
java-version: 17
38+
distribution: 'temurin'
39+
40+
- name: Setup Gradle
41+
uses: gradle/gradle-build-action@v2
42+
43+
- name: Execute Gradle build
44+
env:
45+
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
46+
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL }}
47+
run: ./gradlew build
48+
49+
linux:
50+
name: linux
51+
runs-on: [ ubuntu-latest ]
52+
53+
steps:
54+
- uses: actions/checkout@v3
55+
- name: Set up JDK 17
56+
uses: actions/setup-java@v3
57+
with:
58+
java-version: 17
59+
distribution: 'temurin'
60+
61+
- name: Setup Gradle
62+
uses: gradle/gradle-build-action@v2
63+
64+
- name: Execute Gradle build
65+
env:
66+
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
67+
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL }}
68+
run: ./gradlew build
69+
70+
- name: Generate JaCoCo Badge
71+
uses: cicirello/jacoco-badge-generator@v2
72+
with:
73+
generate-branches-badge: true
74+
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv
75+
76+
- name: Log coverage percentage
77+
run: |
78+
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
79+
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
80+
81+
- name: Upload JaCoCo coverage report
82+
uses: actions/upload-artifact@v2
83+
with:
84+
name: jacoco-report
85+
path: build/reports/jacoco/

‎.github/workflows/release.yml‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish package to the Maven Central Repository and GitHub Packages
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
sonatype-publish:
7+
runs-on: ubuntu-latest
8+
env:
9+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
11+
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
12+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGN_KEY }}
13+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGN_PW }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up JDK 8
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: 8
23+
distribution: 'temurin'
24+
25+
- name: Setup Gradle
26+
uses: gradle/gradle-build-action@v2.4.2
27+
28+
- name: Publish package
29+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
30+
31+
32+
github-publish:
33+
runs-on: ubuntu-latest
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGN_KEY }}
37+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGN_PW }}
38+
permissions:
39+
contents: read
40+
packages: write
41+
steps:
42+
- uses: actions/checkout@v3
43+
with:
44+
fetch-depth: 0
45+
46+
- name: Set up JDK 8
47+
uses: actions/setup-java@v3
48+
with:
49+
java-version: 8
50+
distribution: 'temurin'
51+
52+
- name: Setup Gradle
53+
uses: gradle/gradle-build-action@v2.4.2
54+
55+
- name: Publish package
56+
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository

‎.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+
7+
### IntelliJ IDEA ###
8+
.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

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 optimism-java
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[![mev-share-java CI](https://github.com/optimism-java/mev-share-java/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/optimism-java/mev-share-java/actions/workflows/build.yml)
2+
[![License](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/licenses/MIT)
3+
![Coverage](.github/badges/jacoco.svg)
4+
![Branches](.github/badges/branches.svg)
5+
# mev-share-java

0 commit comments

Comments
 (0)