Skip to content

Commit

Permalink
Merge branch 'master' into support/1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
m-raab committed Jun 5, 2024
2 parents 93bc4b1 + 33bfae3 commit e6d7be1
Show file tree
Hide file tree
Showing 10 changed files with 204 additions and 264 deletions.
56 changes: 9 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,20 @@ name: Run build and tests
on:
push:
branches:
- '*'
- '**'
pull_request:
branches: [ master ]

jobs:
build:
permissions:
checks: write
pull-requests: write
contents: read
environment: CIRelease
runs-on: ubuntu-latest

steps:
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --all --tags

- name: Create .gradle dir
run: mkdir -p $HOME/.gradle
- name: Install gpg secret key
env:
SIGNINGFILE: ${{ secrets.SIGNINGFILE }}
run: |
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Export gpg file
env:
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
run: |
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg
- name: Create gradle sproperties
env:
APIKEY: ${{ secrets.APIKEY }}
APISECRET: ${{ secrets.APISECRET }}
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }}
SONATYPEUSER: ${{ secrets.SONATYPEUSER }}
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties
- name: Build and test with Gradle
env:
JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M"
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
run: ./gradlew test build :publishIntershopMvnPublicationToMavenRepository -s --scan
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: always()
with:
files: build/test-results/**/*.xml
- name: Post Build
run: rm -f $HOME/.gradle/gradle.properties && rm -f $HOME/.docker/config.json
- name: Setup
uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-setup@v1.0
- name: Build
uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-build@v1.0
65 changes: 17 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,26 @@ name: Run release build from tag
on:
push:
tags:
- '*'
- '**'

jobs:
release:
build:
permissions:
checks: write
pull-requests: write
contents: read
environment: CIRelease
runs-on: ubuntu-latest

steps:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --all --tag
- name: Create .gradle dir
run: mkdir -p $HOME/.gradle
- id: install-secret-key
name: Install gpg secret key
env:
SIGNINGFILE: ${{ secrets.SIGNINGFILE }}
run: |
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- id: export-gpg-file
name: Export gpg file
env:
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
run: |
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg
- name: Create gradle sproperties
env:
APIKEY: ${{ secrets.APIKEY }}
APISECRET: ${{ secrets.APISECRET }}
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }}
SONATYPEUSER: ${{ secrets.SONATYPEUSER }}
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties
- name: Run gradle release
env:
JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M"
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
run: ./gradlew -PrunOnCI=true test build :publishIntershopMvnPublicationToMavenRepository :publishPlugins -s --scan
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: always()
- name: Setup
uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-setup@v1.0
- name: Release
uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-release@v1.0
with:
files: build/test-results/**/*.xml
- name: Post Build
run: rm -f $HOME/.gradle/gradle.properties
signing-file: ${{ secrets.SIGNINGFILE }}
signing-key-id: ${{ secrets.SIGNINGKEYID }}
signing-password: ${{ secrets.SIGNINGPASSWORD }}
api-key: ${{ secrets.APIKEY }}
api-secret: ${{ secrets.APISECRET }}
sonatype-user: ${{ secrets.SONATYPEUSER }}
sonatype-password: ${{ secrets.SONATYPEPASSWORD }}
41 changes: 23 additions & 18 deletions README.asciidoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
= GitFlow Version Plugin
:latestRevision: 1.10.0
:latestRevision: 2.0.0
:toc:
:icons: font

NOTE: This plugins requires Gradle 6 and later.
NOTE: This plugins requires Gradle 8.5 and later.

== Summary
This plugin calculates the version from the Git repository. The plugin assumes that the used workflow follows the GitFlow principle. See https://infos.seibert-media.net/display/Productivity/Git-Workflows+-+Der+Gitflow-Workflow (DE) or https://datasift.github.io/gitflow/IntroducingGitFlow.html (EN).
Expand All @@ -29,22 +29,23 @@ version to "local".
=== Properties
[cols="20%,15%,15%,50%", width="95%", options="header"]
|===
|Property | Type | Default value | Description
|*defaultVersion* | String | 1.0.0 | This is the default version if no other information is available
|*mainBranch* | String | master | Name of the main branch, used for release version
|*developBranch* | String | develop | Name of the developer branch, used for integration
|*hotfixPrefix* | String | hotfix | Prefix for hotfix branches, used for bug fix development
|*featurePrefix* | String | feature | Prefix for feature branches, used for feature development
|*releasePrefix* | String | release | Prefix for release branches, used for release preparation
|*supportPrefix* | String | support | Prefix for support branches
|*versionPrefix* | String | version | Prefix for version tags
|*separator* | String | / | Separator for branches and tags
|*versionType* | String | three | Type of the version - *three* digits or *four* digits version number. Possible values are `three` or `four`
|*versionService* | String | (read only) | Service for version calculation
|*version* | String | (read only) | This is the calculated version
|*previousVersion* | String | (read only) | This is the calculated previous version on the branch
|*branchName* | String | (read only) | This is the current branch name
|*fullbranch* | Boolean | false | If this is true, the branch name is used as a part of the version
|Property | Type | Default value | Description
|*defaultVersion* | String | 1.0.0 | This is the default version if no other information is available
|*mainBranch* | String | master | Name of the main branch, used for release version
|*developBranch* | String | develop | Name of the developer branch, used for integration
|*majorBranch* | String | major | Name of the major-version branch, used for next major version development
|*hotfixPrefix* | String | hotfix | Prefix for hotfix branches, used for bug fix development
|*featurePrefix* | String | feature | Prefix for feature branches, used for feature development
|*releasePrefix* | String | release | Prefix for release branches, used for release preparation
|*supportPrefix* | String | support | Prefix for support branches
|*versionPrefix* | String | version | Prefix for version tags
|*separator* | String | / | Separator for branches and tags
|*versionType* | String | three | Type of the version - *three* digits or *four* digits version number. Possible values are `three` or `four`
|*versionService* | String | (read only) | Service for version calculation
|*version* | String | (read only) | This is the calculated version
|*previousVersion* | String | (read only) | This is the calculated previous version on the branch
|*branchName* | String | (read only) | This is the current branch name
|*fullbranch* | Boolean | false | If this is true, the branch name is used as a part of the version
|===

++++
Expand Down Expand Up @@ -137,6 +138,10 @@ The version is always <major_branch_name>-SNAPSHOT. The branch is a feature bran
| createChangLog | CreateChangLog | Creates a changelog for the current working copy, starting with the previous version or with the first commit if there is no previous version
|===

== Contribute

See link:https://github.com/IntershopCommunicationsAG/.github/blob/main/CONTRIBUTE.asciidoc[here] for details.

== License

Copyright 2014-2020 Intershop Communications.
Expand Down
Loading

0 comments on commit e6d7be1

Please sign in to comment.