Просмотр исходного кода

Added maven build / publish action
Removed Travis-CI

Dominik Fuchß 5 лет назад
Родитель
Сommit
bc175b39e6
2 измененных файлов с 74 добавлено и 0 удалено
  1. 23 0
      .github/dependabot.yml
  2. 51 0
      .github/workflows/maven.yml

+ 23 - 0
.github/dependabot.yml

@@ -0,0 +1,23 @@
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "weekly"
+      day: "wednesday"
+      time: "11:00"
+      timezone: "Europe/Berlin"
+    commit-message:
+      prefix: "Dependency"
+      include: "scope"
+  - package-ecosystem: "maven"
+    directory: "/"
+    schedule:
+      interval: "weekly"
+      day: "wednesday"
+      time: "11:00"
+      timezone: "Europe/Berlin"
+    commit-message:
+      prefix: "Dependency"
+      include: "scope"
+

+ 51 - 0
.github/workflows/maven.yml

@@ -0,0 +1,51 @@
+name: Maven Workflow
+
+on:
+  push: 
+  pull_request:
+    types: [opened, synchronize, reopened]
+  
+  # Allows you to run this workflow manually from the Actions tab
+  workflow_dispatch:
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2.3.4
+
+    - name: Set up JDK
+      uses: actions/setup-java@v2
+      with:
+        java-version: 11
+        distribution: 'zulu'
+        
+    - name: Run Maven Install
+      run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
+    
+    - name: Run Tests
+      run: mvn test -B
+      
+    - name: Build Assembly
+      working-directory: jplag
+      run: mvn clean generate-sources package assembly:single
+      
+    - name: Upload Assembly
+      uses: actions/upload-artifact@v2
+      with:
+        name: "JPlag"
+        path: "jplag/target/jplag-*-jar-with-dependencies.jar"
+        
+    - name: Publish Release
+      uses: marvinpinto/action-automatic-releases@latest
+      if: startsWith(github.ref, 'refs/tags/v')
+      with:
+        repo_token: "${{ secrets.GITHUB_TOKEN }}"
+        draft: true
+        title: 'Staging Release (WIP)'
+        files: |
+          jplag/target/jplag-*-jar-with-dependencies.jar
+      
+