Skip to content

Commit c92fc25

Browse files
authored
Merge pull request #880 from syed-salman-technoforte/master
[ MOSIP-19839 ] Adding workflow for pom version changes & updated pu…
2 parents 818a991 + a763e7e commit c92fc25

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release/pre-release Preparation.
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
message:
7+
description: 'Triggered for release or pe-release'
8+
required: false
9+
default: 'Release Preparation'
10+
releaseTags:
11+
description: 'tag to update'
12+
required: true
13+
snapshotTags:
14+
description: 'tag to be replaced'
15+
required: true
16+
base:
17+
description: 'base branch for PR'
18+
required: true
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Setup branch and env
25+
run: |
26+
# Strip git ref prefix from version
27+
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
28+
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
29+
30+
- name: Mannualy changing the pom versions
31+
run: find . -type f -name "*pom.xml" -print0 | xargs -0 sed -i "s/${{ github.event.inputs.snapshotTags }}/${{ github.event.inputs.releaseTags }}/g"
32+
33+
- name: Create Pull Request
34+
uses: peter-evans/create-pull-request@v3
35+
with:
36+
commit-message: Updated Pom versions for release changes
37+
title: Release changes
38+
body: Automated PR for ${{ github.event.inputs.releaseTags }} release.
39+
branch: release-branch
40+
delete-branch: true
41+
base: ${{ github.event.inputs.base }}

0 commit comments

Comments
 (0)