diff --git a/.github/workflows/publish-publicodes.yaml b/.github/workflows/publish-publicodes.yaml index 8b221cded..6f0c7f383 100644 --- a/.github/workflows/publish-publicodes.yaml +++ b/.github/workflows/publish-publicodes.yaml @@ -24,8 +24,6 @@ jobs: publish: needs: test runs-on: ubuntu-18.04 - env: - NPM_TOKEN: ${{ secrets.NPM_PUBLISH_SECRET }} steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 @@ -33,14 +31,15 @@ jobs: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-v2 - run: yarn install --frozen-lockfile - - run: | - echo _auth=$NPM_TOKEN >> .npmrc - echo email=dev@johangirod.com >> .npmrc - echo always-auth=true >> .npmrc - - run: cat ./.npmrc - - working-directory: ./publicodes/core - run: | - npm publish ${{ github.ref != 'refs/heads/master' && '--dry-run' || ''}} --tag next - - working-directory: ./publicodes/ui-react - run: | - npm publish ${{ github.ref != 'refs/heads/master' && '--dry-run' || ''}} --tag next + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_PUBLISH_SECRET }} + dry-run: ${{ github.ref != 'refs/heads/master' }} + package: ./publicodes/core/package.json + tag: next + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_PUBLISH_SECRET }} + dry-run: ${{ github.ref != 'refs/heads/master' }} + package: ./publicodes/ui-react/package.json + tag: next