-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (57 loc) · 1.91 KB
/
update-library.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
66
name: Run Update library and Create PR
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install Dependencies
run: yarn install
- name: Run Script and Commit Changes
run: ./dev/scripts/update-library.sh
- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: 'feat-bump-rpc-methods-${{ env.VERSION_TAG }}'
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
add-paths: |
package.json
src/rpc
commit-message: 'feat: update rpc methods with bitcoin core ${{ env.VERSION_TAG }}'
title: 'feat: update rpc methods with bitcoin core ${{ env.VERSION_TAG }}'
body: |
This PR updates rpc methods in src/rpc folder and the package version to ${{ env.VERSION_TAG }}.
labels: auto-merge
- name: Squash and merge Pull Request
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }}
merge-method: squash
- name: Wait for Changes to be Merged
run: sleep 20s
tag:
needs: build
runs-on: ubuntu-latest
steps:
- name: Wait for Changes to be Pulled
run: sleep 10s
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GH_TOKEN_JP }}
- name: Create Tag
run: |
TAG_NAME=$(node -p "require('./package.json').version")
git tag "v$TAG_NAME"
git push origin "v$TAG_NAME"