Release Patch #57
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
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' |