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

feat(rust-tauri): specify toolchain #53

Merged
merged 1 commit into from
Apr 28, 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
11 changes: 11 additions & 0 deletions .github/workflows/call-rust-tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 8 additions & 2 deletions templates/rust-tauri/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -37,8 +44,7 @@
"desc": "Specify test command"
}
],
"secrets": [
],
"secrets": [],
"outputs": []
},
"setup": {
Expand Down
6 changes: 6 additions & 0 deletions templates/rust-tauri/extra.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading