From ee6dd847ffec8713974a9dd5a8e0eaac09861c64 Mon Sep 17 00:00:00 2001 From: Dominik Frantisek Bucik Date: Sun, 24 Oct 2021 16:45:30 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Prepare=20for=20semanti?= =?UTF-8?q?c=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/checkstyle.xml | 20 ++++++++++++++++++++ .github/workflows/maven-build.yml | 25 +++++++++++++++++++++---- .github/workflows/maven-tests.yml | 23 ----------------------- .release.rc | 16 ++++++++++++++++ README.md | 6 ++++++ package.json | 11 +++++++++++ 6 files changed, 74 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/checkstyle.xml delete mode 100644 .github/workflows/maven-tests.yml create mode 100644 .release.rc create mode 100644 package.json diff --git a/.github/workflows/checkstyle.xml b/.github/workflows/checkstyle.xml new file mode 100644 index 000000000..956d03813 --- /dev/null +++ b/.github/workflows/checkstyle.xml @@ -0,0 +1,20 @@ +name: Checkstyle + +on: pull_request + +jobs: + checkstyle_job: + runs-on: ubuntu-latest + name: Checkstyle job + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run check style + uses: nikitasavinov/checkstyle-action@0.4.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: 'github-pr-review' + fail_on_error: true + level: 'error' + checkstyle_config: 'checkstyle.xml' + diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 82b6c258e..f622a6651 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -1,8 +1,7 @@ - -name: Maven build without running tests +name: Maven build with tests on: [ push, pull_request ] jobs: - test: + build: name: JDK ${{ matrix.java }} runs-on: ubuntu-latest strategy: @@ -21,4 +20,22 @@ jobs: restore-keys: | ${{ runner.os }}-maven-jdk${{ matrix.java }}- - name: Build with Maven - run: mvn -B clean install -DskipTests + run: mvn -B clean install + release: + name: Release + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm install && npx semantic-release + diff --git a/.github/workflows/maven-tests.yml b/.github/workflows/maven-tests.yml deleted file mode 100644 index 1ab2c96c9..000000000 --- a/.github/workflows/maven-tests.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Maven build with tests -on: [ push, pull_request ] -jobs: - test: - name: JDK ${{ matrix.java }} - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '8', '11' ] - steps: - - uses: actions/checkout@v2 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-jdk${{ matrix.java }}-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-jdk${{ matrix.java }}- - - name: Build with Maven - run: mvn -B clean install diff --git a/.release.rc b/.release.rc new file mode 100644 index 000000000..46dd6b435 --- /dev/null +++ b/.release.rc @@ -0,0 +1,16 @@ +{ + "branches": ["master"], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + ["@semantic-release/exec", { + "prepareCmd": "mvn versions:set -DnewVersion=${nextRelease.version}; mvn versions:commit" + }], + "@semantic-release/changelog", + "@semantic-release/github", + ["@semantic-release/git", { + "assets": ["CHANGELOG.md", "pom.xml", "openid-connect-server-webapp/pom.xml", "openid-connect-server/pom.xml"], + "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + }] + ] +} diff --git a/README.md b/README.md index 03550740b..091062072 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # MITREid Connect This project has been forked from the [MITREid Connect repository](https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server). However, due to split between the paths we want to take with the project, we have decided to remove the fork relationship. All the original code will stay licensed to the original project. We would like to thank the developers of the original project for their work and wish them all the best in its continuation. + +## Contribution + +This repository uses [Conventional Commits](https://www.npmjs.com/package/@commitlint/config-conventional). +Any change that significantly changes behavior in a backward-incompatible way or requires a configuration change must be marked as BREAKING CHANGE. + diff --git a/package.json b/package.json new file mode 100644 index 000000000..e89e632a3 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "OpenID-Connect-Java-Spring-Server", + "private": true, + "devDependencies": { + "@semantic-release/changelog": "^5.0.1", + "@semantic-release/git": "^9.0.0", + "@semantic-release/exec": "^5.0.0", + "semantic-release": "^17.4.2" + } +} +