-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add gyp-next updater Co-authored-by: Christian Clauss <[email protected]>
- Loading branch information
1 parent
44cea2e
commit e3f9a77
Showing
3 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters