我正在运行 GitHub Action 工作流程,并且在尝试运行 maven 安装时出现失败错误。在我安装 maven 包之前需要我签名。这是我的工作流程 yml 文件:
name: Github Action
on:
push:
branches:
- master
- release/*
schedule:
- cron: '0 0 * * 0'
jobs:
build:
name: Main
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
java-version: [1.8]
operating-system: [ubuntu-latest]
steps:
- name: Prepare
uses: actions/checkout@v1
- name: Set Up Java Development Kit
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Maven build clean, build, test and install
run: |
mvn clean
mvn install
mvn package --file pom.xml
这就是我得到的:
gpg: directory '/${HOME}/.gnupg' created
gpg: keybox '/${HOME}/.gnupg/pubring.kbx' created
gpg: no default secret key: No secret key
gpg: signing failed: No secret key
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.278 s
[INFO] Finished at: 2019-10-03T06:56:51Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project core: Exit code: 2 -> [Help 1]
有什么方法可以使用 github 操作工作流对我们的包进行签名?