【问题标题】:Fastlane changelog_from_git_commits always empty when running to Github WorkflowFastlane changelog_from_git_commits 在运行到 Github Workflow 时始终为空
【发布时间】:2021-10-26 04:19:23
【问题描述】:

您好,只是想知道为什么 changelog_from_git_commits 在运行到本地机器时有一个值,但是当我尝试将我的通道运行到 Github Workflow 时,它总是空的?

快速文件

desc "Read changelog"
lane :read_commit_history do
  recent = changelog_from_git_commits(
    between: ["9025d4f", "HEAD"] # commit hashes
  )
end

Github 工作流程

name: Read Changelog Workflow
on:
  workflow_dispatch:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby 2.6
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.6.x
      - name: Install Dependencies
        run: gem install bundler && bundle install && bundle update fastlane
      - name: Run Fastlane Compile Lane
        run: bundle exec fastlane read_commit_history

感谢您的帮助,谢谢,

【问题讨论】:

    标签: github-actions fastlane


    【解决方案1】:

    要获取所有标签和分支的所有历史记录,只需添加 fetch-depth: 0

    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    

    https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches

    【讨论】:

      猜你喜欢
      • 2021-08-31
      • 1970-01-01
      • 2013-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多