Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Merges

# yamllint disable-line rule:truthy
on:
push:
branches:
- master

jobs:
merge:
runs-on: ubuntu-latest
env:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
steps:
- name: Set Maven Options
run:
echo "::set-env name=MAVEN_OPTS::-Dmaven.repo.local=$HOME/.m2/repository"
- uses: actions/checkout@v2
- name: Set up Java 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Packages
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build and Run Tests
run: mvn $MAVEN_CLI_OPTS install
- name: Archive SNAPSHOTs
uses: actions/upload-artifact@v1
with:
name: snapshot
path: target
32 changes: 32 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Pull Requests

# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
steps:
- name: Set Maven Options
run:
echo "::set-env name=MAVEN_OPTS::-Dmaven.repo.local=$HOME/.m2/repository"
- uses: actions/checkout@v2
- name: Set up Java 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Packages
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build and Run Tests
run: mvn $MAVEN_CLI_OPTS install
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Releases

# yamllint disable-line rule:truthy
on:
release:
types:
- published

jobs:
release:
runs-on: ubuntu-latest
env:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
steps:
- uses: actions/checkout@v2
- name: Set up Java 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Strip SNAPSHOT Version
run: |
mvn $MAVEN_CLI_OPTS \
versions:set versions:update-child-modules versions:commit \
-DnewVersion=${VERSION/refs\/tags\/} \
-DgenerateBackupPoms=false
env:
VERSION: ${{ github.ref }}
- name: Publish GitHub Packages
run: |
mvn $MAVEN_CLI_OPTS \
deploy \
-D altDeploymentRepository=release::default::${MAVEN_RELEASE_REPO_URL}
env:
MAVEN_RELEASE_REPO_USER: ${{ github.actor }}
MAVEN_RELEASE_REPO_PASS: ${{ secrets.GITHUB_TOKEN }}
MAVEN_RELEASE_REPO_URL: https://maven.pkg.github.com/${{ github.repository }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
target/*
.tox/
*.retry
*.swp
11 changes: 11 additions & 0 deletions .m2/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<id>release</id>
<username>${env.MAVEN_RELEASE_REPO_USER}</username>
<password>${env.MAVEN_RELEASE_REPO_PASS}</password>
</server>
</servers>
</settings>