diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9eb8e12..40d1ddf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,37 +57,36 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} new_version: - name: Update to next snapshot version + if: github.repository == 'nbaars/paseto4j' + name: Update to next SNAPSHOT version needs: [ release ] runs-on: ubuntu-latest - environment: - name: release steps: - uses: actions/checkout@v3 with: - ref: 'main' + fetch-depth: 0 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: 11 distribution: 'zulu' + java-version: 11 architecture: x64 - - name: "Get tag name" - id: tag - uses: dawidd6/action-get-tag@v1 - - name: Set version to next snapshot run: | - mvn --no-transfer-progress versions:set -DnewVersion=${{ steps.tag.outputs.tag }} - mvn --no-transfer-progress build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT versions:commit + mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}-SNAPSHOT versions:commit + - name: Push the changes to new branch + uses: devops-infra/action-commit-push@v0.9.2 + with: + github_token: "${{ secrets.GITHUB_TOKEN }}" + add_timestamp: true + commit_message: "Updating to the new development version" + force: false - - name: Commit pom.xml - run: | - git checkout main - git config user.name Nanne Baars - git config user.email nanneb@gmail.com - find . -name 'pom.xml' | xargs git add - git commit -m "Updating to the new snapshot version" - git push origin main + - name: Create PR + uses: devops-infra/action-pull-request@v0.5.5 + with: + github_token: "${{ secrets.GITHUB_TOKEN }}" + title: ${{ github.event.commits[0].message }} + target_branch: main \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ceefb2c..921abab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,7 @@ [![GitHub contributors](https://img.shields.io/github/contributors/nbaars/paseto4j.svg)](https://github.com/nbaars/paseto4j/graphs/contributors) ![GitHub issues by-label "help wanted"](https://img.shields.io/github/issues/nbaars/paseto4j/help%20wanted.svg) ![GitHub issues by-label "good first issue"](https://img.shields.io/github/issues/nbaars/paseto4j/good%20first%20issue.svg) +[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org) This document describes how you can contribute to Paseto4j. Please read it carefully. @@ -40,12 +41,23 @@ Pull requests should be as small/atomic as possible. Large, wide-sweeping change ### Write a good commit message +* We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and use the following types: + + - fix: + - feat: + - build: + - chore: + - ci: + - docs: + - refactor: + - test: + + Using this style of commits makes it possible to create our release notes automatically. + * Explain why you make the changes. [More infos about a good commit message.](https://betterprogramming.pub/stop-writing-bad-commit-messages-8df79517177d) * If you fix an issue with your commit, please close the issue by [adding one of the keywords and the issue number](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) to your commit message. - For example: `Fix #545` or `Closes #10` - ## How to set up your Contributor Environment 1. Create a GitHub account. Multiple different GitHub subscription plans are available, but you only need a free one. Follow [these steps](https://help.github.com/en/articles/signing-up-for-a-new-github-account "Signing up for a new GitHub account") to set up your account. diff --git a/README.md b/README.md index cd511ac..186d59a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Java implementation of PASETO: Platform-Agnostic Security Tokens [![License](http://img.shields.io/:license-mit-blue.svg)](LICENSE) -[![Quality](https://sonarcloud.io/api/project_badges/quality_gate?project=nbaars_paseto4j)](https://sonarcloud.io/dashboard?id=nbaars_paseto4j) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nbaars_paseto4j&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=nbaars_paseto4j) +[![GitHub release](https://img.shields.io/github/release/nbaars/paseto4j.svg)](https://github.com/nbaars/paseto4j/releases/latest) +[![java-jdk](https://img.shields.io/badge/java%20jdk-11-green.svg)](https://jdk.java.net/) +[![Build](https://github.com/nbaars/paseto4j/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/nbaars/paseto4j/actions/workflows/build.yml) Implementation of [PASETO](https://github.com/paragonie/paseto) library written in Java. This library is focused on taking part of the encryption/decryption part of the tokens it has a little dependencies as possible. How you @@ -104,3 +107,7 @@ docker run -v "${HOME}"/.m2:/root/.m2 -v "${PWD}":/workspace paseto4j ./mvnw ver The first command is only necessary ones, for building the Maven image. +# Release + +We use [Calendar Versioning](https://calver.org/) as version numbers. Creating a new tag and pushing it to Github will start the release process. + diff --git a/commons/pom.xml b/commons/pom.xml index 63ae993..623bade 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -5,7 +5,7 @@ io.github.nbaars paseto4j - 0.0.33-SNAPSHOT + 2023.0-SNAPSHOT paseto4j-commons diff --git a/examples/pom.xml b/examples/pom.xml index 7399151..f4e2824 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ io.github.nbaars paseto4j - 0.0.33-SNAPSHOT + 2023.0-SNAPSHOT paseto4j-examples diff --git a/pom.xml b/pom.xml index 8321a8d..cf0a4b8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ io.github.nbaars paseto4j - 0.0.33-SNAPSHOT + 2023.0-SNAPSHOT pom paseto4j-parent diff --git a/version1/pom.xml b/version1/pom.xml index fc6de9b..36fd8e1 100644 --- a/version1/pom.xml +++ b/version1/pom.xml @@ -5,7 +5,7 @@ io.github.nbaars paseto4j - 0.0.33-SNAPSHOT + 2023.0-SNAPSHOT paseto4j-version1 diff --git a/version2/pom.xml b/version2/pom.xml index 920c523..b7b31c6 100644 --- a/version2/pom.xml +++ b/version2/pom.xml @@ -5,7 +5,7 @@ io.github.nbaars paseto4j - 0.0.33-SNAPSHOT + 2023.0-SNAPSHOT paseto4j-version2 diff --git a/version3/pom.xml b/version3/pom.xml index 2aee135..6c01f35 100644 --- a/version3/pom.xml +++ b/version3/pom.xml @@ -5,7 +5,7 @@ io.github.nbaars paseto4j - 0.0.33-SNAPSHOT + 2023.0-SNAPSHOT paseto4j-version3