Skip to content

Commit

Permalink
OC-117: added 'Bump version' action for updating plugin and openclove…
Browse files Browse the repository at this point in the history
…r core versions via GH actions, renamed 'B Release Jenkins Clover Plugin' to 'CD' to follow the naming convention (some metrics rely on this name)
  • Loading branch information
marek-parfianowicz committed Oct 6, 2023
1 parent 82df99d commit 24118bd
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/A-test-master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: A Test master on JDK8
name: A quick test on JDK8

on:
push:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/Bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Bump version

on:
workflow_dispatch:
inputs:
pluginVersion:
description: 'Jenkins Clover Plugin version'
required: true
type: string
opencloverVersion:
description: 'OpenClover version'
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: 8.0
distribution: temurin

- name: Prepare release tag
run: |
git config user.name "Marek Parfianowicz (github-actions)"
git config user.email "marek.parfianowicz+github-actions@gmail.com"
echo "Updating pom.xml files to version ${{ inputs.pluginVersion }} and ${{ inputs.opencloverVersion }}"
mvn versions:set-property -Dproperty=revision "-DnewVersion=${{ inputs.pluginVersion }}" -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=clover.version "-DnewVersion=${{ inputs.opencloverVersion }}" -DgenerateBackupPoms=false
git add .
git commit -m "Prepare release tag clover-${{ inputs.releaseVersion }}"
git tag clover-${{ inputs.releaseVersion }}
echo "Pushing commits and tag clover-${{ inputs.releaseVersion }}"
git push origin
git push origin clover-${{ inputs.releaseVersion }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: B Release Jenkins Clover Plugin
name: CD
on:
workflow_dispatch:

Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.level>8</java.level>
<jenkins.version>2.289.3</jenkins.version>
<clover.version>4.5.0</clover.version>
</properties>

<dependencyManagement>
Expand All @@ -54,7 +55,7 @@
<dependency>
<groupId>org.openclover</groupId>
<artifactId>clover</artifactId>
<version>4.5.0</version>
<version>${clover.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down

0 comments on commit 24118bd

Please sign in to comment.