Skip to content

Commit

Permalink
Merge branch 'major-release' of 'https://github.com/jjmerchante/grimo…
Browse files Browse the repository at this point in the history
…irelab'

Merges #651
Closes #651
  • Loading branch information
sduenas authored Apr 9, 2024
2 parents 6e5b68f + 9b490dd commit 74eef52
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/grimoirelab-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
required: true
type: boolean
default: false
bump_major:
description: "Create a major version release"
required: true
type: boolean
default: false
git_email:
description: "Git email for commits messages"
required: true
Expand All @@ -25,13 +30,15 @@ jobs:
git_email: ${{ steps.variables.outputs.git_email }}
git_name: ${{ steps.variables.outputs.git_name }}
release_candidate: ${{ steps.variables.outputs.release_candidate }}
bump_major: ${{ steps.variables.outputs.bump_major }}
steps:
- id: variables
name: variables
run: |
echo "git_email=${{ inputs.git_email }}" >> $GITHUB_OUTPUT
echo "git_name=${{ inputs.git_name}}" >> $GITHUB_OUTPUT
echo "release_candidate=${{ inputs.release_candidate}}" >> $GITHUB_OUTPUT
echo "bump_major=${{ inputs.bump_major}}" >> $GITHUB_OUTPUT
grimoirelab-toolkit:
name: grimoirelab-toolkit
Expand All @@ -42,6 +49,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'grimoirelab-toolkit'
module_repository: 'chaoss/grimoirelab-toolkit'
module_directory: 'src/grimoirelab-toolkit'
Expand All @@ -58,6 +66,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'kidash'
module_repository: 'chaoss/grimoirelab-kidash'
module_directory: 'src/grimoirelab-kidash'
Expand All @@ -75,6 +84,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'sortinghat'
module_repository: 'chaoss/grimoirelab-sortinghat'
module_directory: 'src/grimoirelab-sortinghat'
Expand All @@ -92,6 +102,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'cereslib'
module_repository: 'chaoss/grimoirelab-cereslib'
module_directory: 'src/grimoirelab-cereslib'
Expand All @@ -108,6 +119,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'grimoirelab-panels'
module_repository: 'chaoss/grimoirelab-sigils'
module_directory: 'src/grimoirelab-sigils'
Expand All @@ -125,6 +137,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'perceval'
module_repository: 'chaoss/grimoirelab-perceval'
module_directory: 'src/grimoirelab-perceval'
Expand All @@ -143,6 +156,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'perceval-mozilla'
module_repository: 'chaoss/grimoirelab-perceval-mozilla'
module_directory: 'src/grimoirelab-perceval-mozilla'
Expand All @@ -162,6 +176,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'perceval-opnfv'
module_repository: 'chaoss/grimoirelab-perceval-opnfv'
module_directory: 'src/grimoirelab-perceval-opnfv'
Expand All @@ -181,6 +196,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'perceval-puppet'
module_repository: 'chaoss/grimoirelab-perceval-puppet'
module_directory: 'src/grimoirelab-perceval-puppet'
Expand All @@ -200,6 +216,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'perceval-weblate'
module_repository: 'chaoss/grimoirelab-perceval-weblate'
module_directory: 'src/grimoirelab-perceval-weblate'
Expand All @@ -219,6 +236,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'graal'
module_repository: 'chaoss/grimoirelab-graal'
module_directory: 'src/grimoirelab-graal'
Expand All @@ -245,6 +263,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'grimoire-elk'
module_repository: 'chaoss/grimoirelab-elk'
module_directory: 'src/grimoirelab-elk'
Expand Down Expand Up @@ -281,6 +300,7 @@ jobs:
git_email: ${{ needs.variables-job.outputs.git_email }}
git_name: ${{ needs.variables-job.outputs.git_name }}
release_candidate: ${{ needs.variables-job.outputs.release_candidate }}
bump_major: ${{ needs.variables-job.outputs.bump_major }}
module_name: 'sirmordred'
module_repository: 'chaoss/grimoirelab-sirmordred'
module_directory: 'src/grimoirelab-sirmordred'
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release-grimoirelab-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
description: 'Create a release candidate version'
type: string
required: true
bump_major:
description: 'Create a new major version release'
type: string
required: true
module_name:
description: 'Name of the module'
type: string
Expand Down Expand Up @@ -148,7 +152,13 @@ jobs:
old_version=${{ steps.old-version.outputs.version }}
dep_updated=${{ steps.update-dependencies.outputs.dep_updated }}
version=$(semverup $rcArg)
if [ ${{ inputs.bump_major }} == 'true' ]
then
version=$(semverup --bump-version major $rcArg)
else
version=$(semverup $rcArg)
fi
if [ -z $version ] && [ $dep_updated -gt 0 ]
then
echo "Dependencies updated, force new version"
Expand Down

0 comments on commit 74eef52

Please sign in to comment.