Skip to content

Commit

Permalink
feat: implement primary features and challenges
Browse files Browse the repository at this point in the history
------------
# Locales
- **[zh-cn]** 实现主要功能
  • Loading branch information
ymind committed Jun 2, 2020
1 parent a7a1834 commit d333675
Show file tree
Hide file tree
Showing 86 changed files with 4,220 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[*]
charset = utf-8
end_of_line = crlf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 180
tab_width = 4

[{*.sh, mvnw, gradlew}]
end_of_line = lf

[{*.yml, *.yaml}]
indent_size = 2

[*.xml]
indent_size = 2

[*.json]
indent_size = 2

[*.md.mustache]
indent_size = 0
insert_final_newline = false
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.sh text eol=lf
gradlew text eol=lf
mvnw text eol=lf
secret.txt text eol=lf
144 changes: 144 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: rsql-querydsl

on: [push, pull_request]

env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
OSSRH_GPG_SECRET_ID: ${{ secrets.OSSRH_GPG_SECRET_ID }}
OSSRH_GPG_SECRET_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_PASSWORD }}

jobs:
build:
runs-on: ubuntu-latest

if: startsWith(github.event.head_commit.message, 'bumped version to ') != true

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Prepare to build
run: chmod +x ./gradlew

- name: Build project
run: ./gradlew build -x test

test:
needs: [build]
runs-on: ubuntu-latest

if: startsWith(github.event.head_commit.message, 'bumped version to ') != true

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Prepare to build
run: chmod +x ./gradlew

- name: Run tests
run: ./gradlew check test -S

deploy_snapshot:
needs: [build, test]
runs-on: ubuntu-latest

if: (github.ref == 'refs/heads/master') && startsWith(github.event.head_commit.message, 'bumped version to ') != true && startsWith(github.event.head_commit.message, 'release:') != true

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Prepare to build
run: chmod +x ./gradlew

- id: install-secret-key
name: Install gpg secret key
run: echo "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 -d > ./secret.gpg

- id: publish
name: Publish snapshot
run: |
newVersion=`./gradlew derive --preRelease='SNAPSHOT' -i | grep 'NEXT_VERSION:==' | sed 's/^.*NEXT_VERSION:==//g'`
echo "newVersion: ${newVersion}"
echo "::set-output name=newVersion::${newVersion}"
echo "::set-output name=newVersion::${newVersion}"
./gradlew setNewVersion -P newVersion=${newVersion} 1>/dev/null 2>/dev/null
./gradlew clean publish -x test -P OSSRH_GPG_SECRET_KEY=./secret.gpg
rm -rf ./secret.gpg
- name: Generate and push CHANGELOG.md
run: |
./gradlew changelog --toRef=master
gitCommit="bumped version to ${{ steps.publish.outputs.newVersion }}"
git config --global user.name 'ymind'
git config --global user.email '[email protected]'
git add ./CHANGELOG* || true
git add ./build.gradle.kts || true
git commit -m "${gitCommit}" && git push origin || true
deploy_release:
needs: [build, test]
runs-on: ubuntu-latest

if: startsWith(github.ref, 'refs/tags/') && startsWith(github.event.head_commit.message, 'release')

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-

- name: Prepare to build
run: chmod +x ./gradlew

- id: install-secret-key
name: Install gpg secret key
run: echo "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 -d > ./secret.gpg

- name: Publish release
run: ./gradlew clean publish -x test -P OSSRH_GPG_SECRET_KEY=./secret.gpg
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
/gradle.properties

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/

### VS Code ###
.vscode/

### PROJECT ###
logs/
pom.xml.versionsBackup

### CUSTOM CONFIG ###
.gradle
.okhttpcache
secret.gpg
secret.gpg.txt
secret.txt
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
![rsql-querydsl](https://github.com/ymind/rsql-querydsl/workflows/rsql-querydsl/badge.svg?branch=master)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/ymind/rsql-querydsl)](https://github.com/ymind/rsql-querydsl/releases)
[![Maven Central](https://img.shields.io/maven-central/v/team.yi.rsql/rsql-querydsl)](https://search.maven.org/artifact/team.yi.rsql/rsql-querydsl)
[![Semantic Versioning 2.0.0](https://img.shields.io/badge/Semantic%20Versioning-2.0.0-brightgreen)](https://semver.org/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![GitHub](https://img.shields.io/github/license/ymind/rsql-querydsl)](https://github.com/ymind/rsql-querydsl/blob/master/LICENSE)

# rsql-querydsl

Integration RSQL query language and Querydsl framework.

# Author

[@ymind][6], full stack engineer.

# License

This is open-sourced software licensed under the [MIT license][9].

[6]: https://github.com/ymind
[9]: https://opensource.org/licenses/MIT
Loading

0 comments on commit d333675

Please sign in to comment.