forked from react-native-elements/react-native-elements
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (66 loc) · 2.17 KB
/
bump-version.yml
File metadata and controls
76 lines (66 loc) · 2.17 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: (manual PR) Bump release version
on:
workflow_dispatch:
inputs:
name:
type: string
description: Release name
required: true
jobs:
publish:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v2
- name: Install dependencies
uses: ./.github/actions/install
- name: Set env
run: |
BRANCH_NAME="bump-docs-$(date "+%Y%m%d%H%M%S")"
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
- name: Bump docs version
working-directory: website
run: |
yarn version ${{github.event.inputs.name}}
- name: Bump base version
working-directory: packages/base
run: |
npm version v${{github.event.inputs.name}}
- name: Bump themed version
working-directory: packages/themed
run: |
npm version v${{github.event.inputs.name}}
- name: Config git
run: |
git config --local user.email "104670806+rneui@users.noreply.github.com"
git config --local user.name "RNEUI"
- name: Checkout
run: |
git add .
git commit -m "Bump v${{github.event.inputs.pr}}"
git checkout -b ${{ env.BRANCH_NAME }}
git push --set-upstream origin ${{ env.BRANCH_NAME }} --force
- name: Create Pull Request
continue-on-error: true
uses: actions/github-script@v6
with:
script: |
const { repo, owner } = context.repo;
const result = await github.rest.pulls.create({
title: 'chore: bump v${{github.event.inputs.pr}}',
owner,
repo,
head: '${{ env.BRANCH_NAME }}',
base: 'next',
body: [
'This PR is auto-generated by',
'[actions/github-script](https://github.com/actions/github-script).'
].join('\n')
});
github.rest.issues.addLabels({
owner,
repo,
issue_number: result.data.number,
labels: ['feature', 'automated pr', 'need-review']
});