I've had several attempts at deploying an artifact to https://maven.pkg.github.com from .github/workflows
but they all result in a 401 Unauthorised error.
- name: Setup java for mvn deploy
uses: actions/setup-java@v1
with:
java-version: 8
- name: Deploy kaldi-linux.zip
working-directory: kaldi
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
cp ../.github/kaldi/* .
perl -pi -e 's/^(\s{4}<version>).*(<\/version>)/${1}$ENV{"KALDI_VERSION"}${2}/g' pom.xml
mvn deploy
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy)
on project kaldi: Failed to deploy artifacts: Could not transfer artifact org.kaldi:kaldi:pom:da93074
from/to temp (https://maven.pkg.github.com/nalbion/vosk-api): Transfer failed for
https://maven.pkg.github.com/nalbion/vosk-api/org/kaldi/kaldi/da93074/kaldi-da93074.pom 401 Unauthorized -> [Help 1]
logs here: https://github.com/nalbion/vosk-api/runs/683615393?check_suite_focus=true
My understanding is that actions/setup-java
is supposed to provide settings.xml
and environment variables and the deployment should be straight forward. Is there something that needs to be done that I'm not doing?