【问题标题】:Is it possible to allow uesrs to download github artifacts without having a github account是否可以允许用户在没有 github 帐户的情况下下载 github 工件
【发布时间】:2021-08-27 15:57:20
【问题描述】:

是否可以让用户在没有github账号的情况下下载github artifacts?

例如,每次提交合并到 bitcoin-s 的 master 时,我们都会发布安装程序,但用户在尝试获取工件时遇到的一个常见问题是他们必须登录到 github。没有向用户发送明确的通知说明这是一项要求。

如果可能,我想关闭用户拥有 github 帐户的要求。

这是一个例子:

https://github.com/bitcoin-s/bitcoin-s/actions/runs/1151887204

如果您已退出您的 github 帐户,您应该无法下载这些工件。

【问题讨论】:

    标签: github github-actions


    【解决方案1】:

    您可以使用这些工件创建一个 GitHub 版本。

    例如(来自名为Github Releases 的操作)

    on: push
    name: Build and release on push
    jobs:
      release:
        name: Release
        runs-on: ubuntu-latest
        steps:
          - name: Release
            uses: fnkr/github-action-ghr@v1
            if: startsWith(github.ref, 'refs/tags/')
            env:
              GHR_COMPRESS: xz
              GHR_PATH: build/
              GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    

    有许多 GitHub 操作可以做到这一点。见marketplace

    Example showing that artifacts could be downloaded without login

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多