【发布时间】:2021-03-01 15:06:05
【问题描述】:
当标签被推送时,我正在使用 GitHub 操作来创建发布版本。但是,一旦它运行并且我检查了发布选项卡,它并没有正确创建发布。通常,当您运行ng build --prod 时,它会将您的所有代码编译成几个文件,从而大大减少文件大小。当我从发布选项卡下载项目时,这很正常,就像我在文件资源管理器中查看它一样。
这是我的工作流程 yaml 文件:
name: dev-release
on:
create:
tags:
- v*
jobs:
build:
name: setup environment
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache node modules
uses: actions/cache@v2.1.3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1.4.4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm i
npm run build:ci
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.TOKEN }}
draft: true
【问题讨论】:
-
可以添加日志吗?
-
我认为问题在于您没有在
ncipollo/release-action@v1中定义artifacts,因此它发布了当前字典。
标签: angular github continuous-integration github-actions