I uploaded a maven artefact to the GitHub Package Registry (Beta) and want to add it as maven dependency. I'm already in the Regestry-Beta and activated it for my sample HalloMaven project. Also the mvn deploy was succesful, so the artifact is public available here:
https://github.com/TobseF/HelloMaven/packages
But how to include it as a maven dependency?
I tried to add it in a fresh sample project with this pom.xml:
<groupId>de.tfr.test</groupId>
<artifactId>maven-repo-test</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>github</id>
<name>GitHub TobseF Apache Maven Packages</name> …Run Code Online (Sandbox Code Playgroud) 由于各种原因,我们一直在使用 yarn 来管理我们的包,所以我们不能依赖 package-lock.json 来使用 npm 和 github 操作。
我们无法让 Yarn 作为 github 操作的一部分进行身份验证。我们已经将我们的 repo npmrc 配置为:
@COMPANY:registry=https://npm.pkg.github.com
registry=https://registry.npmjs.org/
Run Code Online (Sandbox Code Playgroud)
我们将这个动作用于纱线。
这是我们只是尝试安装模块的基本设置——仅此而已。
name: CI
on: [push]
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: borales/actions-yarn@v2.1.0
with:
auth-token: ${{ secrets.GITHUB_TOKEN }}
registry-url: "https://npm.pkg.github.com"
scope: tlabs
cmd: version
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_REGISTRY_URL: https://npm.pkg.github.com
- name: Create NPMRC
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
- name: Install
run: |
yarn install --verbose
Run Code Online (Sandbox Code Playgroud)
默认情况下,此操作将尝试运行安装以绕过我在“版本”中提供的基本命令,因此它仅显示纱线版本,仅此而已。
运行 yarn …
github yarnpkg github-actions github-package-registry github-ci
当我尝试构建 iOS 存档时,我在 Github CI 上收到以下警告:
ld: warning: ignoring file ios/myframework.xcframework/ios-arm64/myframework.framework/myframework, building for iOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F )
Run Code Online (Sandbox Code Playgroud)
然后这个错误随之而来:
Undefined symbols for architecture arm64:
Run Code Online (Sandbox Code Playgroud)
现在令人困惑的是,这个错误可能由于多种原因而发生,就我而言,它不是我在网上找到的任何原因。