'set-env' 尝试使用 GitHub 操作构建 Android 应用程序时出错 - 不明白如何在这种情况下使用环境文件
'set-env' error when trying to build Android app using GitHub Actions - don't understand how to use Environment Files in this circumstance
我是 GitHub Actions 的新手,想构建我的 Android 应用并将其部署到 Google Play 商店的“内部测试”。我看过一些关于它的好文章,但是一直运行变成了'set-env'错误。我已遵循 link 但仍然不明白如何将其应用于我的特定用例。
The set-env
command is disabled. Please upgrade to using Environment
Files or opt into unsecure command execution by setting the
ACTIONS_ALLOW_UNSECURE_COMMANDS
environment variable to true
. For
more information see:
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
错误如下:
似乎有一些没有环境文件的好例子,这似乎是正确的方法。我正在关注 this, this, and this。都有一些简单的步骤,但这是我遇到问题的地方:
- name: set up JDK 1.8
uses: actions/setup-java@v1.4.2
with:
java-version: 1.8
我的 yaml 文件如下所示:
name: Build
on:
push:
branches:
- '*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3.0.1
- name: set up JDK 1.8
uses: actions/setup-java@v1.4.2
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
我需要先解决这个问题,然后才能解决签名等问题
使用 actions/setup-java 步骤的更新版本,例如:
steps:
- name: checkout
uses: actions/checkout@v3.0.1
- name: set up JDK 1.8
uses: actions/setup-java@
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '8'
我是 GitHub Actions 的新手,想构建我的 Android 应用并将其部署到 Google Play 商店的“内部测试”。我看过一些关于它的好文章,但是一直运行变成了'set-env'错误。我已遵循 link 但仍然不明白如何将其应用于我的特定用例。
The
set-env
command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting theACTIONS_ALLOW_UNSECURE_COMMANDS
environment variable totrue
. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
错误如下:
似乎有一些没有环境文件的好例子,这似乎是正确的方法。我正在关注 this, this, and this。都有一些简单的步骤,但这是我遇到问题的地方:
- name: set up JDK 1.8
uses: actions/setup-java@v1.4.2
with:
java-version: 1.8
我的 yaml 文件如下所示:
name: Build
on:
push:
branches:
- '*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3.0.1
- name: set up JDK 1.8
uses: actions/setup-java@v1.4.2
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
我需要先解决这个问题,然后才能解决签名等问题
使用 actions/setup-java 步骤的更新版本,例如:
steps:
- name: checkout
uses: actions/checkout@v3.0.1
- name: set up JDK 1.8
uses: actions/setup-java@
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '8'