Skip to content

Commit

Permalink
Switching from travis-ci to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicklas2751 committed Dec 21, 2020
1 parent 44aa977 commit c5705b3
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 93 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and test

on: [ push,pull_request ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build and test with Maven
run: ./mvnw -B package
- name: SonarCloud Scan
run: ./mvnw -B org.jacoco:jacoco-maven-plugin:prepare-agent sonar:sonar -Dsonar.projectKey=mediathekview_MServer -Dsonar.organization=mediathekview -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy develop nightly
on:
schedule:
- cron: '0 0 * * *'

jobs:
nightly:
name: Deploy nightly
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: develop
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build and test
run: ./mvnw -B package
- name: Publish to the Maven Central Repository
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USERNAME }}
nexus_password: ${{ secrets.OSSRH_TOKEN }}
maven_profiles: deploy,docker
maven_args: --settings .maven.xml
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release
on:
release:
types: [ created ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: develop
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build and test
run: ./mvnw -B package
- name: Publish to the Maven Central Repository
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USERNAME }}
nexus_password: ${{ secrets.OSSRH_TOKEN }}
maven_profiles: deploy,docker
maven_args: --settings .maven.xml
31 changes: 0 additions & 31 deletions .maven.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,11 @@
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xsi:schemalocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>Central</id>
<name>Central</name>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<servers>
<server>
<!-- Maven Central Deployment -->
<id>ossrh</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
<server>
<id>docker.io</id>
<username>${env.DOCKER_USERNAME}</username>
<password>${env.DOCKER_PASSWORD}</password>
</server>
</servers>

<activeProfiles>
<activeProfile>deploy</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
62 changes: 0 additions & 62 deletions .travis.yml

This file was deleted.

Binary file removed scripte/deploy/secring.gpg.enc
Binary file not shown.

0 comments on commit c5705b3

Please sign in to comment.