Skip to content

Commit 23409b6

Browse files
committed
Mettre à jour les actions GitHub vers la version 3 pour l'upload et le download des artefacts, ajouter un avertissement pour la publication sur NPM si le token n'est pas configuré.
1 parent c43f612 commit 23409b6

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
echo "Package created: $PACKAGE_FILE"
190190
191191
- name: 📤 Upload Package Artifact
192-
uses: actions/upload-artifact@v4
192+
uses: actions/upload-artifact@v3
193193
with:
194194
name: npm-package
195195
path: |
@@ -213,7 +213,7 @@ jobs:
213213
fetch-depth: 0
214214

215215
- name: 📥 Download Package Artifact
216-
uses: actions/download-artifact@v4
216+
uses: actions/download-artifact@v3
217217
with:
218218
name: npm-package
219219

@@ -266,7 +266,6 @@ jobs:
266266
name: 📦 Publish to NPM
267267
runs-on: ubuntu-latest
268268
needs: [prepare-release, create-release]
269-
environment: npm-production
270269

271270
steps:
272271
- name: 📥 Checkout Code
@@ -290,6 +289,15 @@ jobs:
290289
291290
- name: 📦 Publish to NPM
292291
run: |
292+
if [ -z "$NODE_AUTH_TOKEN" ]; then
293+
echo "::warning::NPM_TOKEN secret is not configured. Skipping NPM publication."
294+
echo "To enable NPM publishing:"
295+
echo "1. Go to repository Settings > Secrets and variables > Actions"
296+
echo "2. Add a new secret named 'NPM_TOKEN' with your NPM token"
297+
echo "3. Re-run this workflow"
298+
exit 0
299+
fi
300+
293301
if [[ "${{ needs.prepare-release.outputs.is-prerelease }}" == "true" ]]; then
294302
echo "Publishing pre-release to npm..."
295303
npm publish --tag beta

0 commit comments

Comments
 (0)