Skip to content

Commit f4732d0

Browse files
committed
ci: replaced travis by github actions
1 parent ebb1437 commit f4732d0

File tree

6 files changed

+73
-70
lines changed

6 files changed

+73
-70
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: build
2+
on: [ push, pull_request ]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
java: [ '8', '11', '17', '19' ]
9+
name: Temurin ${{ matrix.java }}
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Set up Java ${{ matrix.java }}
14+
uses: actions/setup-java@v3
15+
with:
16+
java-version: ${{ matrix.java }}
17+
distribution: 'temurin'
18+
cache: 'maven'
19+
20+
- name: Run all tests
21+
run: mvn -B clean test
22+
env:
23+
TZ: UTC
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: release-to-maven-central
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
releaseversion:
6+
description: 'Release version'
7+
required: true
8+
default: '1.0.0'
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- run: |
15+
echo "Release version ${{ github.event.inputs.releaseversion }}!"
16+
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up Maven Central Repository
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 8
23+
server-id: ossrh
24+
server-username: MAVEN_USERNAME
25+
server-password: MAVEN_PASSWORD
26+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
27+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
28+
29+
- name: Set projects Maven version to GitHub Action GUI set version
30+
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}"
31+
32+
- name: Publish package
33+
run: mvn --batch-mode clean deploy -P release -DskipTests=true
34+
env:
35+
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
36+
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
37+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
38+
39+
- name: Create GitHub Release
40+
id: create_release
41+
uses: actions/create-release@v1
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
tag_name: ${{ github.event.inputs.releaseversion }}
46+
release_name: ${{ github.event.inputs.releaseversion }}
47+
body: |
48+
New version ${{ github.event.inputs.releaseversion }} published
49+
draft: false
50+
prerelease: false

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.travis/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.travis/deploy.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

.travis/settings.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)