-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (54 loc) · 1.92 KB
/
Copy pathnew-release.yml
File metadata and controls
61 lines (54 loc) · 1.92 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
name: Create New Release
on:
workflow_dispatch:
inputs:
versionChangeType:
description: 'Type of version bump (major, minor, patch, none)'
required: true
default: 'none'
type: choice
options:
- major
- minor
- patch
- none
env:
GITHUB_AUTH_TOKEN: ${{ secrets.CI_GITHUB_PERSONAL_ACCESS_TOKEN }}
BRANCH_TO_TAG: ${{ github.ref_name }}
VERSION_CHANGE_BRANCH_TO_TAG: 'release/${{ github.event.inputs.versionChangeType }}-version-${{ github.run_id }}'
VERSION_CHANGE_TYPE: ${{ github.event.inputs.versionChangeType }}
jobs:
bump-version:
name: Bump iOS and Android project versions
if: ${{ github.event.inputs.versionChangeType != 'none' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Bump iOS version
run: cd ios && bundle install && bundle exec fastlane version_bump
- name: Bump Android version
run: cd android && bundle install && bundle exec fastlane version_bump
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.CI_GITHUB_PERSONAL_ACCESS_TOKEN }}
branch: ${{ env.VERSION_CHANGE_BRANCH_TO_TAG }}
title: 'release: ${{ github.event.inputs.versionChangeType }} version release'
commit-message: 'release: ${{ github.event.inputs.versionChangeType }} version release'
author: '${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>'
labels: |
release
automated pr
delete-branch: true
create-release:
needs: bump-version
name: Create tagged release
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: ci-script/createTag
run: cd ci-scripts && yarn && yarn createTag