-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from syed-salman-technoforte/1.2.0-prerel
[ MOSIP-19851 ] Adding workflow for pom version changes
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release/pre-release Preparation. | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
message: | ||
description: 'Triggered for release or pe-release' | ||
required: false | ||
default: 'Release Preparation' | ||
releaseTags: | ||
description: 'tag to update' | ||
required: true | ||
snapshotTags: | ||
description: 'tag to be replaced' | ||
required: true | ||
base: | ||
description: 'base branch for PR' | ||
required: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup branch and env | ||
run: | | ||
# Strip git ref prefix from version | ||
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV | ||
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV | ||
- name: Mannualy changing the pom versions | ||
run: find . -type f -name "*pom.xml" -print0 | xargs -0 sed -i "s/${{ github.event.inputs.snapshotTags }}/${{ github.event.inputs.releaseTags }}/g" | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
commit-message: Updated Pom versions for release changes | ||
title: Release changes | ||
body: Automated PR for ${{ github.event.inputs.releaseTags }} release. | ||
branch: release-branch | ||
delete-branch: true | ||
base: ${{ github.event.inputs.base }} |