Skip to content

Create release

Create release #4

name: Create release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to create'
required: true
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_LOGIN: ${{ secrets.MAVEN_LOGIN }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
STAGING_MAVEN_URL: ${{ secrets.STAGING_MAVEN_URL }}
STAGING_MAVEN_LOGIN: ${{ secrets.STAGING_MAVEN_LOGIN }}
STAGING_MAVEN_PASSWORD: ${{ secrets.STAGING_MAVEN_PASSWORD }}
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.9.0
- name: Gradle generate documentation
run: ./gradlew sdk:dokkaHtml
- name: Remove previous documentation
run: rm -rf docs
- name: Copy generated documentation
run: cp -r ./sdk/build/dokka/html/ ./docs
- name: Configure Git
run: |
git config user.name "Tpay Auto Commit"
git config user.email devs@tpay.com
- name: Create release branch
run: git checkout -b release/${{ github.event.inputs.version }}
- name: Commit docs
run: |
git add docs/
git commit --allow-empty -m "Update docs"
- name: Push release branch
run: git push origin release/${{ github.event.inputs.version }}
- name: Create pull request
uses: thomaseizinger/create-pull-request@1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: release/${{ github.event.inputs.version }}
base: master
title: ${{ github.event.inputs.version }} into master