-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (53 loc) · 1.83 KB
/
create_release.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
57
58
59
60
61
62
63
64
65
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:generateDocumentation
- name: Copy generated documentation
run: cp -r ./sdk/build/dokka/javadoc/ ./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