From 8b7b8854b58fccc7626a0975e53f23b505a5cb6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=BA=E5=B7=B7=E4=B8=80=E4=BA=BA?= <1530688385@qq.com> Date: Sat, 9 Mar 2024 21:38:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E=EF=BC=8Cno?= =?UTF-8?q?de=E6=94=AF=E6=8C=81=E7=89=88=E6=9C=AC=E5=8F=B7=E5=88=AB?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index dca68d4..5d55c62 100644 --- a/README.md +++ b/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) ```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 ``` @@ -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 }}