-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.28 KB
/
create_webclient_beta_pr.yaml
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
name: BETA - Create PR on WebClient
on:
release:
types: [published]
workflow_dispatch:
jobs:
create-pr:
if: github.event.release.prerelease == true && contains(github.event.release.tag_name, '-beta.')
runs-on: ubuntu-latest
steps:
- name: Checkout webclient repository
uses: actions/checkout@v2
with:
repository: 'gisce/webclient'
ref: develop
token: ${{ secrets.GH_PAT }}
- name: Update library version in package.json
run: |
NEW_VERSION=${{ github.event.release.tag_name }}
NEW_VERSION=${NEW_VERSION#v} # Remove the leading 'v'
sed -i 's|"@gisce/react-ooui": "[^"]*"|"@gisce/react-ooui": "'"$NEW_VERSION"'"|' package.json
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20.5.0'
- name: Install npm dependencies and generate package-lock.json
run: |
npm install
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GH_PAT }}
commit-message: "fix: Update @gisce/react-ooui to ${{ github.event.release.tag_name }}"
title: "Update @gisce/react-ooui to ${{ github.event.release.tag_name }}"
branch: "update-react-ooui-${{ github.event.release.tag_name }}"