Skip to content

Commit 0f7c03a

Browse files
author
Johannes Spaeth
committed
Deployment
1 parent 9241482 commit 0f7c03a

2 files changed

Lines changed: 62 additions & 1 deletion

File tree

.github/workflows/maven.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Java CI with Maven
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
BuildAndTest:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up JDK 1.8
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 1.8
16+
- name: Build with Maven
17+
run: mvn -B verify --file pom.xml -P ci
18+
19+
20+
Release:
21+
name: Release
22+
if: github.ref == 'refs/heads/master'
23+
runs-on: ubuntu-latest
24+
needs: [BuildAndTest]
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
- name: Set up JDK 1.8
29+
uses: actions/setup-java@v1
30+
with:
31+
java-version: 1.8
32+
- name: Release
33+
uses: qcastel/github-actions-maven-release@master
34+
env:
35+
GPG_TTY: "$(tty)"
36+
JAVA_HOME: /usr/lib/jvm/java-1.8-openjdk/
37+
with:
38+
release-branch-name: "master"
39+
40+
gpg-enabled: "true"
41+
gpg-key-id: ${{ secrets.GPG_KEY_ID }}
42+
gpg-key: ${{ secrets.GPG_KEY }}
43+
44+
maven-repo-server-id: github
45+
maven-repo-server-username: ${{ secrets.CI_USER }}
46+
maven-repo-server-password: ${{ secrets.CI_PACKAGES_TOKEN }}
47+
48+
git-release-bot-name: ${{ secrets.CI_USER }}
49+
git-release-bot-email: "admin@codeshield.de"
50+
51+
access-token: ${{ secrets.GITHUB_TOKEN }}
52+
maven-args: "-DskipTests -P ci"

pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@
1414
<target>1.7</target>
1515
</configuration>
1616
</plugin>
17+
<plugin>
18+
<artifactId>maven-release-plugin</artifactId>
19+
<version>2.5.3</version>
20+
</plugin>
1721
</plugins>
1822
</build>
19-
23+
<scm>
24+
<connection>scm:git:${project.scm.url}</connection>
25+
<developerConnection>scm:git:${project.scm.url}</developerConnection>
26+
<url>git@github.com:johspaeth/PathExpression.git</url>
27+
<tag>${project.version}</tag>
28+
</scm>
2029
<dependencies>
2130
<dependency>
2231
<groupId>com.google.guava</groupId>

0 commit comments

Comments
 (0)