-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (67 loc) · 2.31 KB
/
patch.yml
File metadata and controls
75 lines (67 loc) · 2.31 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release Patch
on:
workflow_dispatch:
jobs:
patch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate next version
uses: mathieudutour/github-tag-action@v6.0
id: tag_version
with:
release_branches: develop
dry_run: true
github_token: ${{ secrets.PAT }}
- name: Change versions.gradle version
run: sed -i "s/moduleVersion = \"[0-9]*\.[0-9]*\.[0-9]*\"/moduleVersion = \"${{ steps.tag_version.outputs.new_version }}\"/g" ./versions.gradle
- name: Create Release PR
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PAT }}
commit-message: Release patch version
title: Release v${{ steps.tag_version.outputs.new_version }}
body: |
This PR is Auto-generated
branch: release-v${{ steps.tag_version.outputs.new_version }}
- name: Create a GitHub release notes
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
commit: release-v${{ steps.tag_version.outputs.new_version }}
outputs:
lversion: ${{ steps.tag_version.outputs.new_version }}
publish:
needs: patch
name: Publish
uses: Bandyer/Bandyer-Android-Design/.github/workflows/publish.yml@develop
with:
release_version: ${{ needs.patch.outputs.lversion }}
secrets:
MAVEN_ACCESSKEY: ${{ secrets.MAVEN_ACCESSKEY }}
MAVEN_SECRETKEY: ${{ secrets.MAVEN_SECRETKEY }}
MAVEN_DISTRIBUTIONID: ${{ secrets.MAVEN_DISTRIBUTIONID }}
automerge:
name: Merge into develop
needs: [patch, publish]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: merge
uses: mtanzi/action-automerge@v1
id: merge
with:
github_token: ${{ secrets.PAT }}
source: release-v${{ needs.patch.outputs.lversion }}
target: 'develop'