Skip to content

Commit

Permalink
update build process
Browse files Browse the repository at this point in the history
  • Loading branch information
drallieiv committed Apr 28, 2021
1 parent d5517db commit e45833e
Show file tree
Hide file tree
Showing 18 changed files with 139 additions and 97 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/maven-publish-release.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#apache-maven-with-a-settings-path

name: Maven Package Release

on:
push:
branches: [ release ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Release
run: mvn -B release:prepare release:perform
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# 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#apache-maven-with-a-settings-path

name: Maven Package
name: Maven Package Develop Snapshot

on:
release:
types: [created]
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
build:
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/maven.yml

This file was deleted.

10 changes: 5 additions & 5 deletions KinanCity-captcha-2captcha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>
<artifactId>KinanCity-captcha-2captcha</artifactId>
<artifactId>kinancity-captcha-2captcha</artifactId>

<dependencies>
<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-api</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-api</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
10 changes: 5 additions & 5 deletions KinanCity-captcha-AntiCaptcha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>
<artifactId>KinanCity-captcha-AntiCaptcha</artifactId>
<artifactId>kinancity-captcha-anticaptcha</artifactId>


<dependencies>
Expand All @@ -18,8 +18,8 @@

<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-api</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-api</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<!-- Lombok -->
Expand Down
10 changes: 5 additions & 5 deletions KinanCity-captcha-ImageTypers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>
<artifactId>KinanCity-captcha-ImageTypers</artifactId>
<artifactId>kinancity-captcha-imagetypers</artifactId>

<dependencies>

<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-api</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-api</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<!-- Lombok -->
Expand Down
6 changes: 3 additions & 3 deletions KinanCity-captcha-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>
<artifactId>KinanCity-captcha-api</artifactId>
<artifactId>kinancity-captcha-api</artifactId>

<dependencies>

Expand Down
10 changes: 5 additions & 5 deletions KinanCity-captcha-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>
<artifactId>KinanCity-captcha-client</artifactId>
<artifactId>kinancity-captcha-client</artifactId>

<dependencies>
<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-AntiCaptcha</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-anticaptcha</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<!-- Lombok -->
Expand Down
4 changes: 2 additions & 2 deletions KinanCity-captcha-server/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>KinanCity-parent</artifactId>
<artifactId>kinancity-parent</artifactId>
<groupId>com.kinancity</groupId>
<version>1.3.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>KinanCity-captcha-server</artifactId>
<artifactId>kinancity-captcha-server</artifactId>
<build>
<plugins>
<plugin>
Expand Down
10 changes: 5 additions & 5 deletions KinanCity-captcha-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>

<artifactId>KinanCity-captcha-server</artifactId>
<artifactId>kinancity-captcha-server</artifactId>

<repositories>
<repository>
Expand Down Expand Up @@ -40,8 +40,8 @@
<dependencies>
<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-AntiCaptcha</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-anticaptcha</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down
11 changes: 11 additions & 0 deletions KinanCity-core/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM openjdk:8
MAINTAINER drallieiv

VOLUME ["/opt/data"]

RUN apt-get update && apt-get install -y --no-install-recommends curl wget && rm -rf /var/lib/apt/lists/*

# Download last KinanCity core jar
RUN curl -s https://api.github.com/repos/drallieiv/KinanCity/releases | grep "browser_download_url" | grep "KinanCity-core" | grep "jar" | head -n 1 | cut -d '"' -f 4 | xargs wget -O KinanCity-core.jar

ENTRYPOINT ["java" "-jar KinanCity-core.jar -o /opt/data/result.csv"]
26 changes: 13 additions & 13 deletions KinanCity-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>

<artifactId>KinanCity-core</artifactId>
<artifactId>kinancity-core</artifactId>
<description>Core module for KinanCity</description>

<repositories>
Expand All @@ -21,32 +21,32 @@

<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-utils</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-utils</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-2captcha</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-2captcha</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-ImageTypers</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-imagetypers</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-AntiCaptcha</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-anticaptcha</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-captcha-client</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-captcha-client</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
2 changes: 2 additions & 0 deletions KinanCity-core/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
curl -s https://api.github.com/repos/drallieiv/KinanCity/releases | grep "browser_download_url" | grep "KinanCity-core" | grep "jar" | head -n 1 | cut -d '"' -f 4 | xargs wget -O KinanCity-core.jar
10 changes: 5 additions & 5 deletions KinanCity-mail/pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>
<artifactId>KinanCity-mail</artifactId>
<artifactId>kinancity-mail</artifactId>
<version>2.0.2</version>

<description>Email validation for KinanCity</description>
Expand Down
6 changes: 3 additions & 3 deletions KinanCity-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<artifactId>kinancity-parent</artifactId>
<version>1.3.3-SNAPSHOT</version>
</parent>
<artifactId>KinanCity-server</artifactId>
<artifactId>kinancity-server</artifactId>

<dependencyManagement>
<dependencies>
Expand All @@ -25,7 +25,7 @@

<dependency>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-core</artifactId>
<artifactId>kinancity-core</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
6 changes: 3 additions & 3 deletions KinanCity-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kinancity</groupId>
<artifactId>KinanCity-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<artifactId>kinancity-parent</artifactId>
<version>1.5.0-SNAPSHOT</version>
</parent>
<artifactId>KinanCity-utils</artifactId>
<artifactId>kinancity-utils</artifactId>

<dependencies>
<!-- Lombok -->
Expand Down
Loading

0 comments on commit e45833e

Please sign in to comment.