diff --git a/.github/workflows/call-rust-tauri.yml b/.github/workflows/call-rust-tauri.yml index 66d7835..5996ff5 100644 --- a/.github/workflows/call-rust-tauri.yml +++ b/.github/workflows/call-rust-tauri.yml @@ -16,6 +16,11 @@ on: default: "lts/*" type: "string" description: "Specify node version, default: lts" + toolchain: + required: false + default: "stable" + type: "string" + description: "Specify rust toolchain version, default: stable" build: required: false default: "build" @@ -109,6 +114,12 @@ jobs: ${{ steps.pnpm-cache-dir.outputs.PNPM_STORE }} key: ${{ runner.os }}-pnpm-store-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} + - name: install stable toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ inputs.toolchain }} + targets: ${{ matrix.target }} + - name: install stable toolchain uses: dtolnay/rust-toolchain@stable with: diff --git a/templates/rust-tauri/data.json b/templates/rust-tauri/data.json index f35b447..b6ac8e4 100644 --- a/templates/rust-tauri/data.json +++ b/templates/rust-tauri/data.json @@ -23,6 +23,13 @@ "type": "string", "desc": "Specify node version, default: lts" }, + { + "name": "toolchain", + "required": "false", + "default": "stable", + "type": "string", + "desc": "Specify rust toolchain version, default: stable" + }, { "name": "build", "required": "false", @@ -37,8 +44,7 @@ "desc": "Specify test command" } ], - "secrets": [ - ], + "secrets": [], "outputs": [] }, "setup": { diff --git a/templates/rust-tauri/extra.j2 b/templates/rust-tauri/extra.j2 index 6b798a4..7e8a2dc 100644 --- a/templates/rust-tauri/extra.j2 +++ b/templates/rust-tauri/extra.j2 @@ -36,6 +36,12 @@ steps: {% set toolchain_cache -%} {%- raw -%} +- name: install stable toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ inputs.toolchain }} + targets: ${{ matrix.target }} + - name: install stable toolchain uses: dtolnay/rust-toolchain@stable with: