-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): enable typegen_check (#3145)
* add cron workflow for updating rust/typescript bindings * install pnpm * make binary executable * finalize changes
- Loading branch information
Showing
2 changed files
with
69 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Update Rust/TS bindings | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 5 * * *" # Runs every day at 5:00 AM UTC | ||
|
||
jobs: | ||
build: | ||
runs-on: | ||
labels: bare-metal | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Local build new Node | ||
uses: ./.github/workflow-templates/cargo-build | ||
- name: Upload Node | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: moonbeam | ||
path: build | ||
|
||
update-typescript-api: | ||
needs: build | ||
runs-on: moonbeam-release-medium | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Download Node | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: moonbeam | ||
path: target/release | ||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
version: 9 | ||
run_install: false | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "test/.nvmrc" | ||
cache: pnpm | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Run Typegen | ||
run: | | ||
chmod uog+x target/release/moonbeam | ||
pnpm i | ||
cd test | ||
pnpm typegen | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
base: master | ||
branch: "update-typescript-api-${{ github.run_id }}" | ||
commit-message: "Update Rust/TS bindings" | ||
draft: true | ||
title: "Update Rust/TS bindings" | ||
reviewers: "moonsong-coredev" | ||
labels: "B0-silent,D2-notlive" |
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