-
Notifications
You must be signed in to change notification settings - Fork 10
109 lines (93 loc) · 3.9 KB
/
update.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Update
"on":
repository_dispatch:
types:
- octokit/openapi release
push:
branches:
- renovate/openapi-typescript-*
workflow_dispatch:
inputs:
version:
description: Version of https://www.npmjs.com/package/@octokit/openapi
required: true
jobs:
update:
runs-on: ubuntu-latest
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.client_payload.action == 'published'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: 18
- run: npm ci
- run: >-
echo "OCTOKIT_OPENAPI_VERSION=${{
github.event.client_payload.release.tag_name }}" >> $GITHUB_ENV
if: github.event.client_payload.release.tag_name
- run: >-
echo "OCTOKIT_OPENAPI_VERSION=${{ github.event.inputs.version }}" >>
$GITHUB_ENV
if: github.event.inputs.version
- run: echo "OCTOKIT_OPENAPI_VERSION => $OCTOKIT_OPENAPI_VERSION"
- uses: gr2m/await-npm-package-version-action@v1
with:
package: "@octokit/openapi"
version: ${{ env.OCTOKIT_OPENAPI_VERSION }}
- name: Update & generate types
run: |
npm run download
npm run generate-types
npm run update-package
if: github.event_name != 'push'
- name: Create Pull Request
if: github.event_name != 'push'
uses: gr2m/create-or-update-pull-request-action@v1.x
env:
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
with:
title: 🚧 OpenAPI types changed
body: >
Make sure to update the commits so that the merge results in helpful
release notes, see [Merging the Pull Request & releasing a new
version](https://github.com/octokit/rest.js/blob/master/CONTRIBUTING.md#merging-the-pull-request--releasing-a-new-version).
In general
- Avoid breaking changes at all costs
- If there are no typescript changes, use `build: cache` as commit
message
- If there are there are only updates, use `fix: ...`
- If there are any new additions, use `feat: ...`
- If there are breaking changes, keep the previous ones and
deprecate them. Only if there is no other way, add `BREAKING CHANGE:
...` to the commit body (not subject!) to trigger a breaking change.
branch: openapi-update
commit-message: WIP
author: Octokit Bot <33075676+octokitbot@users.noreply.github.com>
labels: "Type: Maintenance,typescript"
- name: Create Pull Request
if: github.event_name == 'push'
uses: gr2m/create-or-update-pull-request-action@v1.x
env:
GITHUB_TOKEN: ${{ secrets.OCTOKITBOT_PAT }}
with:
title: 🚧 OpenAPI types changed
body: >
Make sure to update the commits so that the merge results in helpful
release notes, see [Merging the Pull Request & releasing a new
version](https://github.com/octokit/rest.js/blob/master/CONTRIBUTING.md#merging-the-pull-request--releasing-a-new-version).
In general
- Avoid breaking changes at all costs
- If there are no typescript changes, use `build: cache` as commit
message
- If there are there are only updates, use `fix: ...`
- If there are any new additions, use `feat: ...`
- If there are breaking changes, keep the previous ones and
deprecate them. Only if there is no other way, add `BREAKING CHANGE:
...` to the commit body (not subject!) to trigger a breaking change.
branch: ${{ github.ref }}
commit-message: WIP
author: Octokit Bot <33075676+octokitbot@users.noreply.github.com>
labels: "Type: Maintenance,typescript"