Tom*_*ram 6 continuous-integration github angular github-actions
我正在尝试创建一个 GitHub 操作,该操作将检测某个分支何时发生更改,然后构建一个版本。I\xe2\x80\x99m 遇到的问题是在我的 yml 文件中我使用这一行:
\nncipollo/release-action@v1. 这需要有一个可用的标签,否则将会失败。我已经创建并推送了一个标签,但是当我运行该操作时出现此错误
\nError undefined: No tag found in ref or input!\nRun Code Online (Sandbox Code Playgroud)\n这是我的 yml 文件:
\n# Creates a release whenever a new change gets pushed onto the dev branch\n# https://github.com/ncipollo/release-action\n\nname: Dev-Build\non: \n push:\n branches:\n - dev\njobs:\n build:\n name: setup environment \n runs-on: ubuntu-latest\n strategy:\n matrix:\n node-version: [12.x]\n\n steps:\n - uses: actions/checkout@v2\n with:\n fetch-depth: 0\n - name: Cache node modules\n uses: actions/cache@v2.1.3\n with:\n path: ~/.npm\n key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}\n restore-keys: |\n ${{ runner.os }}-node-\n \n - name: Node ${{ matrix.node-version }}\n uses: actions/setup-node@v1.4.4\n with:\n node-version: ${{ matrix.node-version }}\n \n - name: npm install \n run: |\n npm i\n npm run build:ci \n - name: Create Release\n uses: ncipollo/release-action@v1\n with:\n token: ${{ secrets.TOKEN }}\nRun Code Online (Sandbox Code Playgroud)\n
默认情况下,不会使用结帐操作从远程拉取标签:
对于触发工作流的 ref/SHA,默认情况下仅获取单个提交。设置
fetch-depth: 0为获取所有分支和标签的所有历史记录。
请参阅文档如何获取所有标签和分支的所有历史记录:
Run Code Online (Sandbox Code Playgroud)steps: - uses: actions/checkout@v2 with: fetch-depth: 0
| 归档时间: |
|
| 查看次数: |
2664 次 |
| 最近记录: |