mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 11:27:58 +00:00
58e2135d5f
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.8.1 to 2.8.2. - [Release notes](https://github.com/swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](https://github.com/swatinem/rust-cache/compare/f13886b937689c021905a6b90929199931d60db1...779680da715d629ac1d338a641029a2f4372abb5) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-version: 2.8.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
63 lines
2.1 KiB
YAML
63 lines
2.1 KiB
YAML
name: Update Artifacts
|
|
|
|
on:
|
|
workflow_dispatch: # Allows manual triggering
|
|
schedule:
|
|
- cron: "0 0 * * 1" # weekly on Monday at 00:00 UTC
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}-${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
check:
|
|
name: Renew Artifacts
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v6
|
|
# We run this (up-to-date) node locally to fetch metadata from it for the artifacts
|
|
- name: Use substrate and polkadot node binaries
|
|
uses: ./.github/workflows/actions/use-nodes
|
|
|
|
- name: Install Rust stable toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
|
|
|
# This starts a substrate node and runs a few subxt cli child processes to fetch metadata from it and generate code.
|
|
# In particular it generates:
|
|
# - 4 metadata (*.scale) files in the `artifacts` directory
|
|
# - a polkadot.rs file from the full metadata that is checked in integration tests
|
|
# - a polkadot.json in the `artifacts/demo_chain_specs` directory
|
|
- name: Fetch Artifacts
|
|
run: cargo run --bin artifacts
|
|
|
|
- uses: actions/create-github-app-token@v2
|
|
id: app-token
|
|
with:
|
|
app-id: ${{ secrets.SUBXT_PR_MAKER_APP_ID }}
|
|
private-key: ${{ secrets.SUBXT_PR_MAKER_APP_KEY }}
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
base: master
|
|
branch: update-artifacts
|
|
commit-message: Update Artifacts (auto-generated)
|
|
branch-suffix: timestamp
|
|
title: Update Artifacts (auto-generated)
|
|
body: |
|
|
This PR updates the artifacts by fetching fresh metadata from a substrate node.
|
|
It also recreates the polkadot.rs file used in the integration tests.
|
|
It was created automatically by a Weekly GitHub Action Cronjob.
|