From 977cc4a0fc65cccd436b02153542d304298be653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Wo=C5=BAniak?= Date: Wed, 24 Apr 2024 16:59:12 +0200 Subject: [PATCH] build: Create generate.yml --- .github/workflows/generate.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/generate.yml diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 0000000..64267a0 --- /dev/null +++ b/.github/workflows/generate.yml @@ -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