-
Notifications
You must be signed in to change notification settings - Fork 1.8k
51 lines (43 loc) · 1.5 KB
/
update-gyp-next.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
name: Update gyp-next
on:
schedule:
# Run once a week at 12:00 AM UTC on Sunday.
- cron: 0 0 * * *
workflow_dispatch:
permissions:
contents: read
env:
NODE_VERSION: lts/*
jobs:
update-gyp-next:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/github-script@v7
id: get-gyp-next-version
with:
script: |
const result = await github.rest.repos.getLatestRelease({
owner: 'nodejs',
repo: 'gyp-next',
});
return result.data.tag_name
result-encoding: string
- name: Update gyp-next
run: |
python update-gyp.py --no-commit ${{ steps.get-gyp-next-version.outputs.result }}
- name: Open or update PR for the gyp-next update
uses: gr2m/create-or-update-pull-request-action@v1
with:
branch: actions/update-gyp-next
author: Node.js GitHub Bot <[email protected]>
title: 'feat: update gyp-next to ${{ steps.get-gyp-next-version.outputs.result }}'
commit-message: 'feat: update gyp-next to ${{ steps.get-gyp-next-version.outputs.result }}'
update-pull-request-title-and-body: true
body: >
This is an automated update of the gyp-next to
https://github.com/nodejs/gyp-next/releases/tag/${{ steps.get-gyp-next-version.outputs.result }}.
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}