forked from tf-govstack/esignet
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.97 KB
/
release_changes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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: Updating the Release URL in POM
run: |
cd .github/workflows
sed -i 's/OSSRH_SNAPSHOT_URL/RELEASE_URL/g' push_trigger.yml
- name: Updating libs-snapshot-local to libs-release local for artifactory URL's.
run: find . -type f -name "*Dockerfile" -print0 | xargs -0 sed -i "s/libs-snapshot-local/libs-release-local/g"
- name: removing -DskipTests
run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-DskipTests"//g"
# - name: removing --Dgpg.skip
# run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-Dgpg.skip"//g"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: Release Bot Pre-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 }}
token: ${{ secrets.ACTION_PAT }}