install deps #3
Workflow file for this run
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
name: Generate Chain Specs | |
on: | |
workflow_dispatch: | |
push: | |
permissions: | |
contents: write | |
jobs: | |
build-and-generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y git protobuf-compiler | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.79.0 | |
override: true | |
- name: Build chain-spec-generator | |
run: cargo build --package chain-spec-generator --features=fast-runtime --release | |
- name: Generate chain specs | |
run: | | |
mkdir -p chain-specs/local | |
PACKAGES=( | |
"paseo-local" | |
) | |
for pkg in "${PACKAGES[@]}"; do | |
./target/release/chain-spec-generator "$pkg" --raw > "chain-specs/local/$pkg.json" | |
echo "Generated chain-specs/local/$pkg.json" | |
done | |
- name: Setup Git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.PASEO_RUNTIME_CI_PAT }} | |
- name: Commit changes | |
run: | | |
git add chain-specs/local/*.json | |
git commit -m "Update chain specs" || echo "No changes to commit" | |
git push |