问题描述
我正在尝试通过 this tutorial 之后的 GH Actions 将我的 Python 包上传到 PyPI。
我的步骤有问题:
- name: Publish distribution ? to PyPI
if: startsWith(github.ref,'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
我在终端做的是:
git commit -am "ci: test push"
git tag -a testtag -m "this is a test annotated tag"
git push origin master --follow-tags
这些命令确实在GitHub上出现了新标签后,但仍然跳过了该步骤..
当我修改 CI YAML 代码以打印 echo ${GITHUB_REF}
时,我得到:refs/heads/master
也许我可以补充一点,Action 本身运行良好 - 当我注释掉条件语句时,包确实 会发布......我做错了什么吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)