git - Travis:将拉取请求合并到主服务器后进行部署
问题描述
假设我有release-1.0.0
一个分支,我想为这个分支创建一个到 master 的拉取请求。创建拉取请求后,Travis 开始检查并运行构建脚本。
如果一切正常,github 会给我一个绿旗,并允许我将发布分支合并到 master。我将发布分支合并到 master 中,现在我想开始部署(到 npm 和 github 版本)。
我想使用 git tag 部署到 github 版本,但是当我将 pr 合并到 master 时,我丢失了我的标签,我得到了这样的结果:Skipping a deployment with the release provider because this is not a tagged commit。关于如何为我的 git 流做到这一点的任何想法?这是我的配置:
language: node_js
node_js:
- lts/*
install:
- npm ci
- npm install -g codecov
script:
- npm run build
- ./node_modules/.bin/nyc report --reporter lcovonly -- -R spec
- codecov
branches:
only:
- master
deploy:
- provider: releases
skip_cleanup: true
api_key:
secure: *****
file: 'README.md'
on:
tags: true
repo: name_of_repo
branch: master
- provider: npm
email: email@email.com
api_key:
secure: *****
on:
tags: true
repo: name_of_repo
branch: master
解决方案
推荐阅读
- logging - 如何将 EMR 流式作业日志复制到 S3 并清理 EMR 核心节点磁盘上的日志
- powershell - 在使用数据之前尝试将字符串限制为 8000 个字符,但我返回了空值
- excel - 从 Excel 宏创建数据透视图
- python - 如何有效地删除所有数字作为 pandas 上的数据清理?
- c# - 当方法返回类型 IEnumerable 时,方法返回 List。但 GetType 显示为 List
- html - 输入字段宽度不受边距影响
- android-studio - 安装失败并显示消息 Failed to finalize session : INSTALL_PARSE_FAILED_NO_CERTIFICATES
- php - 如何使用来自 PhpStorm 的 .htaccess 文件?
- javascript - Hoare 快速排序算法无法正常工作
- rust - 不能在循环中多次借用可变错误