ci: used more relaiable npm config for publish
Some checks failed
CI / build-and-publish (push) Failing after 53s
Some checks failed
CI / build-and-publish (push) Failing after 53s
This commit is contained in:
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -55,8 +55,13 @@ jobs:
|
||||
GITEA_TOKEN: ${{ secrets.G_TOKEN }}
|
||||
run: |
|
||||
set -e
|
||||
OWNER="${{ github.repository_owner }}"
|
||||
echo "//${GITHUB_SERVER_URL#https://}/api/packages/${OWNER}/npm/:_authToken=${GITEA_TOKEN}" > .npmrc
|
||||
HOST="${GITHUB_SERVER_URL#https://}"
|
||||
OWNER="${GITHUB_REPOSITORY_OWNER}"
|
||||
REGISTRY="https://${HOST}/api/packages/${OWNER}/npm"
|
||||
|
||||
npm config set "//${HOST}/api/packages/${OWNER}/npm/:_authToken" "${GITEA_TOKEN}"
|
||||
npm config set registry "${REGISTRY}"
|
||||
|
||||
npm publish \
|
||||
--registry "https://${GITHUB_SERVER_URL#https://}/api/packages/${OWNER}/npm" \
|
||||
--ignore-scripts
|
||||
|
||||
Reference in New Issue
Block a user