Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add workflow to verify template builds #12

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/verify-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Verify Template
on:
workflow_dispatch:
pull_request:
push:
branches: [ 'main' ]
paths-ignore:
- "**.md"

jobs:
build:
runs-on: ubuntu-latest
env:
PROJECT_NAME: blueprint-template
steps:
- uses: actions/checkout@v4
- uses: JohnPeel/cargo-generate-action@main
with:
name: ${{ env.PROJECT_NAME }}
arguments: >
--define gh-username="webb-tools"
--define project-description="An example blueprint"
--define project-homepage="https://webb.tools"
--define flakes=true
--define docker=true
--define base-image="rustlang/rust:nightly"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- run: |
cp -r $PROJECT_NAME ${{ runner.temp }}/
cd ${{ runner.temp }}/$PROJECT_NAME
cargo check
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use color_eyre::Result;
use gadget_sdk as sdk;
use {{project-name}} as blueprint;
use {{project-name | snake_case}} as blueprint;
use sdk::{
config::ContextConfig, events_watcher::substrate::SubstrateEventWatcher,
events_watcher::tangle::TangleEventsWatcher, tangle_subxt::*,
Expand Down