Skip to content

Commit f21506b

Browse files
fix: Fix publish flow (#127)
* fix: Remove skip-lockfile-update option from Nx release version command * fix: Improve publish flow to Verdaccio by iterating over project dist folders * fix: Add .npmrc to .gitignore to prevent publishing sensitive data
1 parent d661c9f commit f21506b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/publish-alpha.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,21 @@ jobs:
7272
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}
7373

7474
- name: Publish to Verdaccio
75-
run: npx nx release publish --registry=${{ secrets.VERDACCIO_REGISTRY_URL }}
75+
shell: bash
76+
run: |
77+
set -euo pipefail
78+
echo "Publishing packages from dist folders to Verdaccio..."
79+
80+
IFS=',' read -ra PROJECTS <<< "${{ steps.libs.outputs.projects }}"
81+
for project in "${PROJECTS[@]}"; do
82+
DIST_PATH="libs/$project/dist"
83+
if [ -d "$DIST_PATH" ]; then
84+
echo "Publishing $project from $DIST_PATH..."
85+
npm publish "$DIST_PATH" --access public --tag alpha --registry="${{ secrets.VERDACCIO_REGISTRY_URL }}"
86+
else
87+
echo "Warning: $DIST_PATH does not exist, skipping $project"
88+
fi
89+
done
7690
7791
- name: Summary
7892
run: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ docs/docs.backup.json
5959

6060
**/.cache/
6161
.github/codex/
62+
63+
.npmrc

0 commit comments

Comments
 (0)