diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3294f24 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +# +# Copyright (c) 2023 - for information on the respective copyright owner +# see the NOTICE file and/or the repository https://github.com/carbynestack/java-http-client. +# +# SPDX-License-Identifier: Apache-2.0 +# +name: Release +on: + push: + branches: + - master +jobs: + release-please: + runs-on: ubuntu-22.04 + steps: + - name: Release Please + uses: google-github-actions/release-please-action@v3 + with: + command: manifest + signoff: "cs-minion " + token: ${{ secrets.CS_MINION_PAT }} \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5279a37..93c948d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,14 @@ repos: hooks: - id: pretty-format-java args: [--autofix] +- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook + rev: v9.5.0 + hooks: + - id: commitlint + stages: + - commit-msg + additional_dependencies: + - '@commitlint/config-conventional' - repo: https://github.com/executablebooks/mdformat rev: 0.7.7 hooks: @@ -19,6 +27,7 @@ repos: - "80" additional_dependencies: - mdformat-gfm + exclude: ^3RD-PARTY-LICENSES/.*$ - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.27.1 hooks: diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..88d1d60 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0" +} \ No newline at end of file diff --git a/README.md b/README.md index 2329d93..b023bc3 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![codecov](https://codecov.io/gh/carbynestack/java-http-client/branch/master/graph/badge.svg?token=iJ4L3PbGvT)](https://codecov.io/gh/carbynestack/java-http-client) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/819ea9adb8a64ae18beb9065a9b00b82)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=carbynestack/java-http-client&utm_campaign=Badge_Grade) [![Known Vulnerabilities](https://snyk.io/test/github/carbynestack/java-http-client/badge.svg)](https://snyk.io/test/github/carbynestack/java-http-client) +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md) diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..63d933e --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2023 - for information on the respective copyright owner + * see the NOTICE file and/or the repository https://github.com/carbynestack/java-http-client. + * + * SPDX-License-Identifier: Apache-2.0 + */ +module.exports = { + extends: ["@commitlint/config-conventional"], + rules: { + "scope-empty": [0, "never"], + "scope-enum": [2, "always", ["java-http-client"]], + }, +}; \ No newline at end of file diff --git a/pom.xml b/pom.xml index 80ad97b..8393597 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ 4.0.0 java-http-client io.carbynestack - ${revision} + 0.1.0 Carbyne Stack Java HTTP Client Basic Java client used by Carbyne Stack service client implementations. @@ -37,7 +37,6 @@ UTF-8 UTF-8 - 0.1-SNAPSHOT false 1.8 diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..0ee695c --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,13 @@ +{ + "bump-minor-pre-major": true, + "separate-pull-requests": true, + "pull-request-title-pattern": "chore: release ${component} ${version}", + "pull-request-header": ":package: Staging a new release", + "packages": { + ".": { + "package-name": "java-http-client", + "release-type": "maven", + "skip-snapshot": true + } + } +} \ No newline at end of file