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

subfolder seems broken #9

Open
taurr opened this issue Jan 17, 2022 · 3 comments
Open

subfolder seems broken #9

taurr opened this issue Jan 17, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@taurr
Copy link

taurr commented Jan 17, 2022

Something has broken.

It should be possible to specify a subfolder , but it doesn't seem to work.

I have a repo with 3 related templates in it. It has been setup to build the generated templates, but the GH action fails, trying to get the user to select a template 😦

The subfolder option has been specified.

https://github.com/taurr/bevy-template-rs/actions/runs/1708208429

part of my workflow:

  lib_plugin:
    runs-on: ubuntu-latest
    env:
      PROJECT_NAME: mytemplate
    steps:
      - uses: actions/checkout@v2
      - name: Expand template
        uses: cargo-generate/[email protected]
        with:
          name: ${{ env.PROJECT_NAME }}
          subfolder: lib-plugin

      - name: Setup Rust rust-toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: Check expanded template
        # 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
@sassman
Copy link
Member

sassman commented Jan 17, 2022

for completeness I attach the build log:

image

@sassman sassman added the bug Something isn't working label Jan 17, 2022
@pplmx
Copy link

pplmx commented Feb 18, 2024

I'm confused for this configuration.

Here is my config in 0.18.3

            -   name: Generate Example from Template
                uses: cargo-generate/[email protected]
                with:
                    name: ${{ env.PROJECT_NAME }}
                    subfolder: template/cxx
                    template_values_file: .github/workflows/template_values.toml

If I want to upgrade to 0.18.5, how to change it? Could you give me some help? Thanks a lot.

@pplmx
Copy link

pplmx commented Mar 27, 2024

Like this:

            -   name: Generate cxx example from template/cxx
                uses: cargo-generate/[email protected]
                with:
                    name: ${{ env.CXX_PROJECT_NAME }}
                    template: template/cxx
                    arguments: "--template-values-file .github/workflows/template_values.toml --verbose"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants