Skip to content

Commit

Permalink
build: Create generate.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jawoznia authored Apr 24, 2024
1 parent e7fc2a6 commit 977cc4a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Try to expand local template using cargo-generate
on:
push:

jobs:
build:
runs-on: ubuntu-latest
env:
PROJECT_NAME: project-foo
steps:
- uses: actions/checkout@v4
- uses: cargo-generate/cargo-generate-action@latest
with:
name: ${{ env.PROJECT_NAME }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
# we need to move the generated project to a temp folder, away from the template project
# otherwise `cargo` runs would fail
# see https://github.com/rust-lang/cargo/issues/9922
- run: |
mv $PROJECT_NAME ${{ runner.temp }}/
cd ${{ runner.temp }}/$PROJECT_NAME
cargo check
cargo test

0 comments on commit 977cc4a

Please sign in to comment.