Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d7b437b

Browse files
author
wenshenjun
committedJan 7, 2020
init
0 parents  commit d7b437b

File tree

5 files changed

+170
-0
lines changed

5 files changed

+170
-0
lines changed
 

‎.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Java CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: checkout
12+
uses: actions/checkout@v2.0.0
13+
- name: Set up JDK 1.8
14+
uses: actions/setup-java@v1.3.0
15+
with:
16+
java-version: 1.8
17+
- name: Build with Maven
18+
run: mvn -Dmaven.test.skip=true clean package

‎.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy artifacts
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v2.0.0
16+
- name: Set up JDK 1.8
17+
uses: actions/setup-java@v1.3.0
18+
with:
19+
java-version: 1.8
20+
- name: setup-maven-settings
21+
uses: whelk-io/maven-settings-xml-action@v2
22+
env:
23+
GITHUB_USER: ${{ secrets.github_user }}
24+
GITHUB_TOKEN: ${{ secrets.github_token }}
25+
with:
26+
servers: '[{ "id": "github", "username": "${GITHUB_USER}", "password": "${GITHUB_TOKEN}" }]'
27+
- name: Build with Maven
28+
run: mvn -Dmaven.test.skip=true clean package
29+
- name: Deploy to Github Package Registry
30+
run: mvn -B -Dmaven.wagon.http.pool=false -DskipTests=true deploy

‎.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**
5+
!**/src/test/**
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
30+
### VS Code ###
31+
.vscode/
32+
33+
logs/
34+
35+
# jrebel
36+
rebel.xml
37+
38+
.DS_Store

‎pom.xml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.wenshenjun</groupId>
5+
<artifactId>githubPackageTest</artifactId>
6+
<packaging>jar</packaging>
7+
<version>1.0.0-SNAPSHOT</version>
8+
<name>github Package Test</name>
9+
<description>github Package Test</description>
10+
<scm>
11+
<url>http://github.com/codingOnGithub/githubPackageTest</url>
12+
<connection>scm:git:https://github.com/codingOnGithub/githubPackageTest.git</connection>
13+
<developerConnection>scm:git:https://github.com/codingOnGithub/githubPackageTest.git</developerConnection>
14+
</scm>
15+
<distributionManagement>
16+
<repository>
17+
<id>github</id>
18+
<name>GitHub codingOnGithub Apache Maven Packages</name>
19+
<url>https://maven.pkg.github.com/codingOnGithub/githubPackageTest</url>
20+
</repository>
21+
</distributionManagement>
22+
<properties>
23+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24+
<maven.compiler.source>1.8</maven.compiler.source>
25+
<maven.compiler.target>1.8</maven.compiler.target>
26+
</properties>
27+
<build>
28+
<pluginManagement>
29+
<plugins>
30+
<plugin>
31+
<artifactId>maven-clean-plugin</artifactId>
32+
<version>3.1.0</version>
33+
</plugin>
34+
<plugin>
35+
<artifactId>maven-resources-plugin</artifactId>
36+
<version>3.0.2</version>
37+
</plugin>
38+
<plugin>
39+
<artifactId>maven-compiler-plugin</artifactId>
40+
<version>3.8.0</version>
41+
</plugin>
42+
<plugin>
43+
<artifactId>maven-surefire-plugin</artifactId>
44+
<version>2.22.1</version>
45+
</plugin>
46+
<plugin>
47+
<artifactId>maven-jar-plugin</artifactId>
48+
<version>3.0.2</version>
49+
</plugin>
50+
<plugin>
51+
<artifactId>maven-install-plugin</artifactId>
52+
<version>2.5.2</version>
53+
</plugin>
54+
<plugin>
55+
<artifactId>maven-deploy-plugin</artifactId>
56+
<version>2.8.2</version>
57+
</plugin>
58+
<plugin>
59+
<artifactId>maven-site-plugin</artifactId>
60+
<version>3.7.1</version>
61+
</plugin>
62+
<plugin>
63+
<artifactId>maven-project-info-reports-plugin</artifactId>
64+
<version>3.0.0</version>
65+
</plugin>
66+
</plugins>
67+
</pluginManagement>
68+
</build>
69+
</project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.wenshenjun.util;
2+
3+
/**
4+
* @author wenshenjun
5+
* @description
6+
* @date 2020/01/06 10:55 PM
7+
*/
8+
public class TestUtil {
9+
public static long sum(long x, long y) {
10+
return Math.addExact(x, y);
11+
}
12+
public static String hello(String name) {
13+
return "hello " + name;
14+
}
15+
}

0 commit comments

Comments
 (0)
Please sign in to comment.