Merge pull request #220 from cyface-de/master

Add Github Action to publish Github Package
This commit is contained in:
abrensch 2020-02-02 23:21:15 +01:00 committed by GitHub
commit ebeb1e9471
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 216 additions and 142 deletions

27
.github/workflows/maven.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Publish to Github Packages
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml -pl '!brouter-routing-app'
- name: Deploy to Github Package Registry
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
run:
mvn --settings settings.xml deploy -pl '!brouter-routing-app'

292
pom.xml
View file

@ -1,158 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.btools</groupId>
<artifactId>brouter</artifactId>
<version>1.5.5</version>
<packaging>pom</packaging>
<url>http://brouter.de/brouter/</url>
<name>brouter</name>
<description>configurable OSM offline router with elevation awareness, Java + Android</description>
<modelVersion>4.0.0</modelVersion>
<groupId>org.btools</groupId>
<artifactId>brouter</artifactId>
<version>1.5.5</version>
<packaging>pom</packaging>
<url>http://brouter.de/brouter/</url>
<name>brouter</name>
<description>configurable OSM offline router with elevation awareness, Java + Android</description>
<modules>
<module>brouter-util</module>
<module>brouter-codec</module>
<module>brouter-expressions</module>
<module>brouter-mapaccess</module>
<module>brouter-core</module>
<module>brouter-map-creator</module>
<module>brouter-server</module>
<module>brouter-routing-app</module>
</modules>
<modules>
<module>brouter-util</module>
<module>brouter-codec</module>
<module>brouter-expressions</module>
<module>brouter-mapaccess</module>
<module>brouter-core</module>
<module>brouter-map-creator</module>
<module>brouter-server</module>
<module>brouter-routing-app</module>
</modules>
<developers>
<developer>
<id>arndt.brenschede</id>
<name>Arndt Brenschede</name>
<email>Arndt.Brenschede@web.de</email>
</developer>
<developer>
<id>norbert.truchsess</id>
<name>Norbert Truchsess</name>
<email>norbert.truchsess@t-online.de</email>
</developer>
</developers>
<developers>
<developer>
<id>arndt.brenschede</id>
<name>Arndt Brenschede</name>
<email>Arndt.Brenschede@web.de</email>
</developer>
<developer>
<id>norbert.truchsess</id>
<name>Norbert Truchsess</name>
<email>norbert.truchsess@t-online.de</email>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<targetJdk>1.6</targetJdk>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<targetJdk>1.6</targetJdk>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.6.0</version>
<extensions>true</extensions>
<configuration>
<genDirectory>gen</genDirectory>
<genDirectoryAidl>gen</genDirectoryAidl>
<extractDuplicates>true</extractDuplicates>
<sdk>
<platform>28</platform>
</sdk>
<dex>
<jvmArguments>
<jvmArgument>-Xmn16m</jvmArgument>
<jvmArgument>-Xms256m</jvmArgument>
<jvmArgument>-Xmx512m</jvmArgument>
</jvmArguments>
</dex>
</configuration>
</plugin>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.6.0</version>
<extensions>true</extensions>
<configuration>
<genDirectory>gen</genDirectory>
<genDirectoryAidl>gen</genDirectoryAidl>
<extractDuplicates>true</extractDuplicates>
<sdk>
<platform>28</platform>
</sdk>
<dex>
<jvmArguments>
<jvmArgument>-Xmn16m</jvmArgument>
<jvmArgument>-Xms256m</jvmArgument>
<jvmArgument>-Xmx512m</jvmArgument>
</jvmArguments>
</dex>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${targetJdk}</source>
<target>${targetJdk}</target>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${targetJdk}</source>
<target>${targetJdk}</target>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<author>false</author>
<bottom><![CDATA[Copyright &#169; {currentYear} <a href="http://brensche.de/brouter/" target="_top">brensche.de/brouter</a>]]></bottom>
<quiet>true</quiet>
<show>protected</show>
<failOnError>false</failOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<author>false</author>
<bottom><![CDATA[Copyright &#169; {currentYear} <a href="http://brensche.de/brouter/" target="_top">brensche.de/brouter</a>]]></bottom>
<quiet>true</quiet>
<show>protected</show>
<failOnError>false</failOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub brouter Apache Maven Packages</name>
<url>https://maven.pkg.github.com/${env.GITHUB_REPOSITORY}</url>
</repository>
</distributionManagement>
</project>

39
settings.xml Normal file
View file

@ -0,0 +1,39 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>github</id>
<name>GitHub Cyface Apache Maven Packages</name>
<url>https://maven.pkg.github.com/${env.GITHUB_REPOSITORY}</url>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>${env.GITHUB_USERNAME}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>