From 215eeb45efc700ea31a4eca5b5a98b210b485db8 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas Date: Tue, 21 Jan 2025 22:38:28 +0000 Subject: [PATCH] finalize changes --- .github/workflows/update-typescript-api.yml | 19 +++-- .github/workflows/version-bump.yml | 78 +++++++-------------- 2 files changed, 40 insertions(+), 57 deletions(-) diff --git a/.github/workflows/update-typescript-api.yml b/.github/workflows/update-typescript-api.yml index e66375f408..e261186f7a 100644 --- a/.github/workflows/update-typescript-api.yml +++ b/.github/workflows/update-typescript-api.yml @@ -14,8 +14,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - ref: "runtime-${{ github.event.inputs.spec_version }}" - name: Local build new Node uses: ./.github/workflow-templates/cargo-build - name: Upload Node @@ -28,7 +26,8 @@ jobs: needs: build runs-on: moonbeam-release-medium permissions: - contents: read + contents: write + pull-requests: write steps: - name: Checkout uses: actions/checkout@v4 @@ -37,8 +36,20 @@ jobs: 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 @@ -46,7 +57,7 @@ jobs: uses: peter-evans/create-pull-request@v7 with: base: master - branch: "typescript-api-${{ github.event.ref }}" + branch: "update-typescript-api-${{ github.run_id }}" commit-message: "Update Rust/TS bindings" draft: true title: "Update Rust/TS bindings" diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 81de8c14b1..b151986b82 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -1,66 +1,38 @@ -name: Update Rust/TS bindings - +name: Create version bump ticket on: - pull_request: - push: - branches: - - master + workflow_dispatch: + inputs: + from: + description: "Polkadot version to bump from (ex: v1.3.0)" + required: true + to: + description: "Polkadot version to bump to (ex: v1.7.2)" + required: true jobs: - build: - runs-on: - labels: bare-metal + create_bump_ticket: + runs-on: ubuntu-latest permissions: contents: read + issues: write 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 + - name: Use Node.js uses: actions/setup-node@v4 with: node-version-file: "test/.nvmrc" - cache: pnpm - registry-url: https://registry.npmjs.org/ - - name: Run Typegen + - name: Generate version bump issue + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - chmod uog+x target/release/moonbeam - pnpm i - cd test - pnpm typegen - - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + cd tools + yarn install + yarn --silent run print-version-bump-info -- --from ${{ github.event.inputs.from }} --to ${{ github.event.inputs.to }} | tee ../version-bump.md + - name: Create version bump issue + uses: peter-evans/create-issue-from-file@v5 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" \ No newline at end of file + title: Update polkadot-sdk from ${{ github.event.inputs.from }} to ${{ github.event.inputs.to }} + content-filepath: ./version-bump.md + labels: | + automated issue