【问题标题】:how to download the archived GitHub Release Source code using GitHub Actions如何使用 GitHub Actions 下载存档的 GitHub 发布源代码
【发布时间】:2021-08-10 13:08:32
【问题描述】:

我想知道是否可以下载存档的 GitHub 发布的源代码文件,该文件通常在使用 GitHub 操作的发布页面中被视为(源代码(zip)和源代码(tar.gz)。 我在市场上看到了很多下载发布资产的操作,我尝试了其中的一些操作,但大多数情况下他们只下载发布的一部分上传的资产,而不是存档的源代码本身。请让我知道 GitHub 操作中是否有可用的插件来调用它。

【问题讨论】:

    标签: github github-actions github-cli github-release


    【解决方案1】:

    我正在做一个完整的 github 操作来获取 github 存储库的发布数据。我见过很多不同的 github 操作,它们并不支持我想要的一切。

    您可以使用 github 操作获取发布数据https://github.com/marketplace/actions/github-release-data,它还会输出发布的 tarball 和 zipball 输出 url。

            # Fetch release data of the current repository from where the workflow is used.
          - name: Get Release data
            id: release_data
            uses: KevinRohn/github-full-release-data@v2.0.0
        
          - name: Show tag name with echo
            run: echo ${{ steps.release_data.outputs.zipball_url }}
    

    替代方案

    如果你不能等到上面的 github action 完成,你也可以使用已经支持下载 tarball 和 zipball 的 github action。

    https://github.com/robinraju/release-downloader

    引用的 github 操作有据可查。

    - uses: robinraju/release-downloader@v1.3
      with:
        repository: "user/repo"
        latest: true
        tarBall: true
        zipBall: true
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-09
      • 1970-01-01
      • 1970-01-01
      • 2017-12-27
      相关资源
      最近更新 更多