-
Notifications
You must be signed in to change notification settings - Fork 138
50 lines (45 loc) · 1.97 KB
/
publish-types.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
43
44
45
46
47
48
49
50
name: Publish types to DefinitelyTyped
on:
release:
types:
- published
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Recurly-js
uses: actions/checkout@v2
with:
path: recurly-js
- name: Checkout DefinitelyTyped
uses: actions/checkout@v2
with:
repository: DefinitelyTyped/DefinitelyTyped
ref: master
path: DefinitelyTyped
fetch-depth: 1
- name: Create changes
id: create-changes
run: |
rm recurly-js/test/types/tsconfig.json \
recurly-js/test/types/tslint.json \
recurly-js/test/types/index.d.ts \
recurly-js/types/tsconfig.json \
recurly-js/types/tslint.json
cp -R recurly-js/types/* DefinitelyTyped/types/recurly__recurly-js
cp -R recurly-js/test/types/* DefinitelyTyped/types/recurly__recurly-js/test
out_version=$(cat recurly-js/package.json | jq '.version' -r )
echo ::set-output name=version::$out_version
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
path: DefinitelyTyped
commit-message: Updates recurly-js types
branch: update-recurly-js-${{ steps.create-changes.outputs.version }}
push-to-fork: recurly/DefinitelyTyped
token: ${{ secrets.DEFINITELY_TYPED_PR_GITHUB_ACCESS_TOKEN }}
title: Updates types for Recurly.js v${{ steps.create-changes.outputs.version }}
body: |
# Updates types for Recurly.js v${{ steps.create-changes.outputs.version }}
View the full recurly-js release [here](https://github.com/recurly/recurly-js/releases/tag/v${{ steps.create-changes.outputs.version }})
Note: This is an automated pull request. For more info, see the [Recurly.js](https://github.com/recurly/recurly-js) repository or [documentation](https://developers.recurly.com/reference/recurly-js/index.html).