Skip to content

Commit

Permalink
specify toolchain (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
heliannuuthus authored Apr 28, 2024
1 parent ec8eaa6 commit 7ba0419
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
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

0 comments on commit 7ba0419

Please sign in to comment.