fix(workflows): Remove npmci wrappers from CI workflows and use pnpm/npm CLI directly

This commit is contained in:
2025-10-26 14:07:55 +00:00
parent 49cfcaedd1
commit 4c55243646
4 changed files with 38 additions and 68 deletions

View File

@@ -23,24 +23,16 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @ship.zone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
npm config set registry https://registry.npmjs.org
pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
npm config set registry https://registry.npmjs.org
pnpm audit --audit-level=high --dev
continue-on-error: true
test:
@@ -55,12 +47,10 @@ jobs:
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
pnpm install
pnpm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
pnpm install
pnpm build

View File

@@ -23,22 +23,16 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @ship.zone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
npm config set registry https://registry.npmjs.org
pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
npm config set registry https://registry.npmjs.org
pnpm audit --audit-level=high --dev
continue-on-error: true
test:
@@ -51,23 +45,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @ship.zone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
pnpm install
pnpm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
pnpm install
pnpm build
release:
needs: test
@@ -79,28 +65,22 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @ship.zone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm install
pnpm install
# Extract server host from GITHUB_SERVER_URL (remove https://)
GITEA_HOST="${GITHUB_SERVER_URL#https://}"
GITEA_REGISTRY="$GITHUB_SERVER_URL/api/packages/$GITHUB_REPOSITORY_OWNER/npm/"
# Configure Gitea npm registry
npmci command npm config set @${GITHUB_REPOSITORY_OWNER}:registry "$GITEA_REGISTRY"
npmci command npm config set "//${GITEA_HOST}/api/packages/${GITHUB_REPOSITORY_OWNER}/npm/:_authToken" "$GITEA_TOKEN"
npm config set @${GITHUB_REPOSITORY_OWNER}:registry "$GITEA_REGISTRY"
npm config set "//${GITEA_HOST}/api/packages/${GITHUB_REPOSITORY_OWNER}/npm/:_authToken" "$GITEA_TOKEN"
# Publish to Gitea
npmci command npm publish
pnpm publish --no-git-checks
# Conditionally publish to npmjs.org if token exists
if [ -n "$NPMCI_TOKEN_NPM" ]; then
npmci command npm config set registry https://registry.npmjs.org
npmci npm publish
npm config set registry https://registry.npmjs.org
npm config set //registry.npmjs.org/:_authToken "$NPMCI_TOKEN_NPM"
pnpm publish --no-git-checks
fi
metadata:
@@ -114,24 +94,14 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @ship.zone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
npm install -g typescript
pnpm install
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
tsdoc
continue-on-error: true