Skip to content

Commit

Permalink
Add GitHub workflow and package registry
Browse files Browse the repository at this point in the history
  • Loading branch information
fcrespel committed Feb 4, 2020
1 parent abfb903 commit 6bab6cf
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on: [push]

env:
MAVEN_OPTS: -Xms64m -Xmx256m
MAVEN_CLI_OPTS: -s .mvn/settings.xml -B
MAVEN_GOALS: clean verify
GITHUB_USER: fcrespel
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build
run: mvn ${MAVEN_CLI_OPTS} ${MAVEN_GOALS} -DskipTests
- name: Test
run: mvn ${MAVEN_CLI_OPTS} test
- name: Upload jar
uses: actions/upload-artifact@v1
with:
name: jar
path: target/runtastic-export-converter.jar
- name: Upload jar-with-dependencies
uses: actions/upload-artifact@v1
with:
name: jar-with-dependencies
path: target/runtastic-export-converter-jar-with-dependencies.jar
- name: Publish artifacts
if: startsWith(github.ref, 'refs/tags')
run: mvn ${MAVEN_CLI_OPTS} deploy -DskipTests
11 changes: 11 additions & 0 deletions .mvn/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>github</id>
<username>${env.GITHUB_USER}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Pipeline Status](https://gitlab.com/fcrespel/runtastic-export-converter/badges/master/pipeline.svg)](https://gitlab.com/fcrespel/runtastic-export-converter/pipelines)
[![Build status](https://github.com/fcrespel/runtastic-export-converter/workflows/CI/badge.svg)](https://github.com/fcrespel/runtastic-export-converter/actions?query=workflow%3ACI)
[![License](https://img.shields.io/github/license/fcrespel/runtastic-export-converter.svg)](https://opensource.org/licenses/MIT)

# Runtastic Export Converter
Expand All @@ -23,7 +23,7 @@ First, make sure to unzip the Runtastic export archive in a directory of your ch

To run the command line tool, use the `jar-with-dependencies` JAR file in the `target` directory, for example:

java -jar runtastic-export-converter-1.0.0-SNAPSHOT-jar-with-dependencies.jar
java -jar runtastic-export-converter-jar-with-dependencies.jar

Expected arguments:
list <export path>
Expand All @@ -32,15 +32,15 @@ To run the command line tool, use the `jar-with-dependencies` JAR file in the `t

To list sport sessions from an export directory (here, `runtastic-export-20190807-000` in the current directory):

java -jar runtastic-export-converter-1.0.0-SNAPSHOT-jar-with-dependencies.jar list runtastic-export-20190807-000
java -jar runtastic-export-converter-jar-with-dependencies.jar list runtastic-export-20190807-000

To convert a single sport session to TCX (here, session ID `fdd2f131-ef65-4e6c-b27e-50b8ecf465d4`):

java -jar runtastic-export-converter-1.0.0-SNAPSHOT-jar-with-dependencies.jar convert runtastic-export-20190807-000 fdd2f131-ef65-4e6c-b27e-50b8ecf465d4 fdd2f131-ef65-4e6c-b27e-50b8ecf465d4.tcx
java -jar runtastic-export-converter-jar-with-dependencies.jar convert runtastic-export-20190807-000 fdd2f131-ef65-4e6c-b27e-50b8ecf465d4 fdd2f131-ef65-4e6c-b27e-50b8ecf465d4.tcx

To convert all sport sessions to GPX (here, in a `runtastic-export-gpx` directory):

java -jar runtastic-export-converter-1.0.0-SNAPSHOT-jar-with-dependencies.jar convert runtastic-export-20190807-000 all runtastic-export-gpx gpx
java -jar runtastic-export-converter-jar-with-dependencies.jar convert runtastic-export-20190807-000 all runtastic-export-gpx gpx

## License

Expand Down
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
<slf4j.version>1.7.28</slf4j.version>
</properties>

<scm>
<connection>scm:git:https://github.com/fcrespel/runtastic-export-converter.git</connection>
<developerConnection>scm:git:https://github.com/fcrespel/runtastic-export-converter.git</developerConnection>
<url>https://github.com/fcrespel/runtastic-export-converter</url>
</scm>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Apache Maven Packages</name>
<url>https://maven.pkg.github.com/fcrespel/runtastic-export-converter</url>
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down Expand Up @@ -51,6 +65,7 @@
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down

0 comments on commit 6bab6cf

Please sign in to comment.