Skip to content

Commit

Permalink
switch to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrebs committed Dec 4, 2023
1 parent d873b72 commit 775ac91
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 47 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/maven-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Pull Request Checks

on:
release:
on: [ pull_request ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrhs01 # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
cache: 'maven'
- name: Build with Maven
run: mvn -B package --file pom.xml
33 changes: 33 additions & 0 deletions .github/workflows/maven-publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Maven "Snapshot" Release

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrhs01 # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Change Versions
run: mvn versions:set -DnewVersion=${{ github.ref_name }}-SNAPSHOT
- name: Publish to OSSRH with Apache Maven
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/maven-publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Maven Snapshot deploy

on:
push:
branches:
- 'main'
- '2022.06.x'

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrhs01 # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
cache: 'maven'
- name: Publish to OSSRH with Apache Maven
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
46 changes: 0 additions & 46 deletions Jenkinsfile

This file was deleted.

2 changes: 2 additions & 0 deletions src/test/integration/dfi/mycore.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
MCR.Solr.ServerURL=http\://localhost\:${solr.port}/
MCR.Solr.DelayIndexing_inMS=200
MCR.Solr.Core.main.Name=mir
MCR.Solr.Core.classification.Name=mir-classifications
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<persistence-unit name="MyCoRe" transaction-type="RESOURCE_LOCAL">
<!-- http://stackoverflow.com/questions/15026302/multiple-jars-single-persistence-unit-solution -->
<mapping-file>META-INF/mycore-base-mappings.xml</mapping-file>
<mapping-file>META-INF/mycore-ifs-mappings.xml</mapping-file>
<mapping-file>META-INF/mycore-iview2-mappings.xml</mapping-file>
<mapping-file>META-INF/mycore-pi-mappings.xml</mapping-file>
<mapping-file>META-INF/mycore-user2-mappings.xml</mapping-file>
<mapping-file>META-INF/mycore-acl-mappings.xml</mapping-file>
<!-- required for MIR only: -->
<mapping-file>META-INF/mir-module-mappings.xml</mapping-file>
<properties>
Expand Down

0 comments on commit 775ac91

Please sign in to comment.