-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (62 loc) · 1.94 KB
/
Copy pathcreate-release.yml
File metadata and controls
62 lines (62 loc) · 1.94 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
name: Create release PR
on:
workflow_dispatch:
inputs:
version:
description: 'New version'
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Create app token
uses: actions/create-github-app-token@v3.2.0
id: app-token
with:
app-id: ${{ vars.THEOPLAYER_BOT_APP_ID }}
private-key: ${{ secrets.THEOPLAYER_BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v7
with:
token: ${{ steps.app-token.outputs.token }}
- name: Configure Git user
# language=bash
run: |
git config user.name 'theoplayer-bot[bot]'
git config user.email '873105+theoplayer-bot[bot]@users.noreply.github.com'
- name: Setup Java
uses: actions/setup-java@v5.2.0
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6.1.1
with:
# https://github.com/gradle/actions/blob/v6.0.0/README.md#licensing-notice
cache-disabled: true
- name: Update connector version
# language=bash
run: ./gradlew :updateVersion -PconnectorVersion=$VERSION
env:
VERSION: ${{ inputs.version }}
- name: Push to release branch
shell: bash
# language=bash
run: |
git commit -a -m ${{ inputs.version }}
git push origin "HEAD:release/${{ inputs.version }}"
- name: Create pull request
shell: bash
# language=bash
run: |
gh pr create \
--base master \
--head "release/${{ inputs.version }}" \
--title "Release ${{ inputs.version }}" \
--body "This will release a new version of the Android connectors."
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}