From e90cd4930d31528c160f7260cd758bba4c28d68e Mon Sep 17 00:00:00 2001 From: arturu Date: Sat, 27 Apr 2024 14:17:37 +0200 Subject: [PATCH] release(2.0.3): fix action --- .github/workflows/create-release.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 0f5c4ce3..6253c1b6 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -95,33 +95,28 @@ jobs: fi shell: bash - # Push to npm registry + # Build and Push to npm registry - name: Use Node.js ${{ matrix.node-version }} + if: env.valid_tag == 'true' uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: Build Project + if: env.valid_tag == 'true' run: | npm install npm run build:prod - - name: Clean package - run: | rm -rf .git .github node_modules .gitignore - - name: Compress Dist Folder - run: zip -r skenografia.zip ./dist - - name: Set Package Version - run: | + zip -r skenografia.zip ./dist npm version ${{ env.release_tag }} - - name: NPM registry - run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc npm config set registry https://registry.npmjs.org/ - - name: Publish package to NPM - run: npm publish --access=public + npm publish --access=public + rm ~/.npmrc + shell: bash continue-on-error: true env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - run: rm ~/.npmrc - name: Create GitHub Release if: env.valid_tag == 'true'