mirror of
https://git.studyfor.work/actions/gitea-tool-cache.git
synced 2026-01-12 00:16:03 +08:00
修改说明,node支持版本号别名
This commit is contained in:
parent
8d3c8e0696
commit
8b7b8854b5
40
README.md
40
README.md
@ -2,10 +2,12 @@
|
||||
|
||||
## 注意
|
||||
|
||||
1、需要指定具体版本号
|
||||
1、go 和 dotnet 需要指定具体版本号
|
||||
|
||||
2、因为我没有 mac,所以没有 mac 环境
|
||||
|
||||
3、如果你想让 go 和 dotnet 支持版本号别名,欢迎 [pr](https://github.com/kongxiangyiren/version-alias)
|
||||
|
||||
## Usage
|
||||
|
||||
See [action.yml](action.yml)
|
||||
@ -13,11 +15,13 @@ See [action.yml](action.yml)
|
||||
<!-- start usage -->
|
||||
|
||||
```yaml
|
||||
- uses: kongxiangyiren/gitea-tool-cache@v1
|
||||
- id: tool-cache
|
||||
uses: kongxiangyiren/gitea-tool-cache@v2
|
||||
with:
|
||||
# 需要指定具体版本号
|
||||
node-version: 18.18.0
|
||||
# go 和 dotnet 需要指定具体版本号
|
||||
node-version: 18
|
||||
go-version: 1.21.1
|
||||
dotnet-version: 6.0.100
|
||||
```
|
||||
|
||||
<!-- end usage -->
|
||||
@ -30,8 +34,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
# 使用gitea-tool-cache需要指定具体的版本号
|
||||
node: ['18.18.0']
|
||||
# go 和 dotnet 需要指定具体版本号
|
||||
node: [18]
|
||||
go: ['1.21.1']
|
||||
dotnet: ['6.0.100']
|
||||
|
||||
@ -39,15 +43,16 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: https://gitea.cn/actions/checkout@v4
|
||||
- id: tool-cache
|
||||
uses: kongxiangyiren/gitea-tool-cache@v1
|
||||
uses: kongxiangyiren/gitea-tool-cache@v2
|
||||
with:
|
||||
# 需要指定具体版本号
|
||||
# go 和 dotnet 需要指定具体版本号
|
||||
node-version: ${{ matrix.node }}
|
||||
go-version: ${{ matrix.go }}
|
||||
dotnet-version: ${{ matrix.dotnet }}
|
||||
- uses: https://gitea.cn/actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
# gitea-tool-cache导出 node 具体版本
|
||||
node-version: ${{ steps.tool-cache.outputs.node-version }}
|
||||
- run: node -v
|
||||
- uses: https://gitea.cn/actions/setup-go@v2
|
||||
with:
|
||||
@ -71,20 +76,21 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
# 使用gitea-tool-cache需要指定具体的版本号
|
||||
node: ['18.18.0']
|
||||
# 只有node支持版本号别名
|
||||
node: ['18']
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.cn/actions/checkout@v4
|
||||
- name: 安装环境
|
||||
uses: kongxiangyiren/gitea-tool-cache@v1
|
||||
- id: tool-cache
|
||||
uses: kongxiangyiren/gitea-tool-cache@v2
|
||||
with:
|
||||
# 需要指定具体版本号
|
||||
# 只有node支持版本号别名
|
||||
node-version: ${{ matrix.node }}
|
||||
- uses: https://gitea.cn/actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
# gitea-tool-cache导出 node 具体版本
|
||||
node-version: ${{ steps.tool-cache.outputs.node-version }}
|
||||
- run: node -v
|
||||
```
|
||||
|
||||
@ -103,7 +109,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: https://gitea.cn/actions/checkout@v4
|
||||
- name: 安装环境
|
||||
uses: kongxiangyiren/gitea-tool-cache@v1
|
||||
uses: kongxiangyiren/gitea-tool-cache@v2
|
||||
with:
|
||||
# 需要指定具体版本号
|
||||
go-version: ${{ matrix.go }}
|
||||
@ -128,7 +134,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: https://gitea.cn/actions/checkout@v4
|
||||
- id: tool-cache
|
||||
uses: kongxiangyiren/gitea-tool-cache@v1
|
||||
uses: kongxiangyiren/gitea-tool-cache@v2
|
||||
with:
|
||||
# 需要指定具体版本号
|
||||
dotnet-version: ${{ matrix.dotnet }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user