Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Github Workflow to Conflict Visualizer #121

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/artifact-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish Java Package

on:
# push:
# tags:
# - 'jpo-conflictvisualizer-*'
pull_request:
branches: [ "develop" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Remove snapshot from version
run: |
cd api/jpo-conflictvisualizer-api
mvn versions:set -DremoveSnapshot

- name: Build with Maven
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
MAVEN_GITHUB_TOKEN_NAME: ${{ vars.MAVEN_GITHUB_TOKEN_NAME }}
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
MAVEN_GITHUB_ORG: ${{ github.repository_owner }}
run: |
cd api/jpo-conflictvisualizer-api
mvn -s settings.xml -B package --file pom.xml -DskipTests -Ppackage-jar

- name: Publish to GitHub Packages
run: |
cd api/jpo-conflictvisualizer-api
mvn -s settings.xml --batch-mode -Dgithub_organization=${{ github.repository_owner }} deploy -DskipTests -Ppackage-jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GITHUB_TOKEN_NAME: ${{ vars.MAVEN_GITHUB_TOKEN_NAME }}
MAVEN_GITHUB_TOKEN: ${{ secrets.MAVEN_GITHUB_TOKEN }}
MAVEN_GITHUB_ORG: ${{ github.repository_owner }}
19 changes: 16 additions & 3 deletions api/jpo-conflictvisualizer-api/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,39 @@
<activeProfile>default</activeProfile>
</activeProfiles>
<servers>
<server>
<id>github</id>
<username>jpo_conflictvisualizer</username>
<password>${env.MAVEN_GITHUB_TOKEN}</password>
</server>
<server>
<id>github_jpo_ode</id>
<username>jpo_conflictmonitor</username>
<username>jpo_conflictvisualizer</username>
<password>${env.MAVEN_GITHUB_TOKEN}</password>
</server>
<server>
<id>github_jpo_geojsonconverter</id>
<username>jpo_conflictmonitor</username>
<username>jpo_conflictvisualizer</username>
<password>${env.MAVEN_GITHUB_TOKEN}</password>
</server>
<server>
<id>github_jpo_conflictmonitor</id>
<username>jpo_conflictmonitor</username>
<username>jpo_conflictvisualizer</username>
<password>${env.MAVEN_GITHUB_TOKEN}</password>
</server>
</servers>
<profiles>
<profile>
<id>default</id>
<repositories>
<repository>
<id>github</id>
<name>GitHub Apache Maven Packages</name>
<url>https://maven.pkg.github.com/${env.MAVEN_GITHUB_ORG}/jpo-ode</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>github_jpo_ode</id>
<name>GitHub JPO ODE</name>
Expand Down
Loading