Skip to content

Commit

Permalink
Updated README and dependencies and added CI
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinAlpert committed Jul 8, 2020
1 parent 111670c commit 3628510
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 6 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/post-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Post-push actions

# Run workflow only on commits to `master`
on:
push:
branches:
- master

jobs:
maven_deploy:
name: Deploy to Maven
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1

- uses: actions/setup-java@v1
with:
java-version: '13'

- name: Release to Central Repository
uses: samuelmeuli/[email protected]
with:
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}

github_release:
name: Create GitHub release
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Setup JDK 13
uses: actions/setup-java@v1
with:
java-version: '13'

- name: Build project
run: mvn -B clean package

- name: Get project infos
id: get-project-infos
run: echo "::set-output name=maven_version::$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q)" && echo "::set-output name=maven_artifactId::$(mvn -Dexec.executable='echo' -Dexec.args='${project.artifactId}' --non-recursive exec:exec -q)"

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-project-infos.outputs.maven_version }}
release_name: ${{ steps.get-project-infos.outputs.maven_version }}

- name: Upload JAR asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/${{ steps.get-project-infos.outputs.maven_artifactId }}-${{ steps.get-project-infos.outputs.maven_version }}.jar
asset_name: ${{ steps.get-project-infos.outputs.maven_artifactId }}-${{ steps.get-project-infos.outputs.maven_version }}.jar
asset_content_type: application/java-archive

- name: Upload JavaDoc asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/${{ steps.get-project-infos.outputs.maven_artifactId }}-${{ steps.get-project-infos.outputs.maven_version }}-javadoc.jar
asset_name: ${{ steps.get-project-infos.outputs.maven_artifactId }}-${{ steps.get-project-infos.outputs.maven_version }}-javadoc.jar
asset_content_type: application/java-archive

- name: Upload Sources asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/${{ steps.get-project-infos.outputs.maven_artifactId }}-${{ steps.get-project-infos.outputs.maven_version }}-sources.jar
asset_name: ${{ steps.get-project-infos.outputs.maven_artifactId }}-${{ steps.get-project-infos.outputs.maven_version }}-sources.jar
asset_content_type: application/java-archive
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Lambda2sql (lambda) -> "sql"
==========

**Please note:** This is a Java 13 library so make sure you have at least Java 10 installed when using it.
**Please note:** This is a Java 13 library so make sure you have at least Java 13 installed when using it.

Convert Java 8 lambdas to SQL statements.

Expand Down Expand Up @@ -64,7 +64,7 @@ You can include the Maven dependency:
<dependency>
<groupId>com.github.collinalpert</groupId>
<artifactId>lambda2sql</artifactId>
<version>2.2.1</version>
<version>2.2.2</version>
</dependency>
```

Expand Down
10 changes: 6 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.collinalpert</groupId>
<artifactId>lambda2sql</artifactId>
<version>2.2.1</version>
<version>2.2.2</version>
<packaging>jar</packaging>

<name>lambda2sql</name>
Expand Down Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.1</version>
<version>5.6.2</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -100,7 +100,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -113,7 +113,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
<configuration>
<additionalOptions>-html5</additionalOptions>
</configuration>
Expand Down Expand Up @@ -141,7 +141,9 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
Expand Down

0 comments on commit 3628510

Please sign in to comment.