From 7559707f5f8e9adcaab933391218e273317350ec Mon Sep 17 00:00:00 2001 From: Firoz Ahmed Date: Mon, 3 May 2021 17:43:38 +0530 Subject: [PATCH] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 56 +++++++++---------------------- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 410654c..7061f49 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,43 +8,19 @@ on: types: [created] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 12 - - run: npm ci - - run: npm test - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + release: + name: 🚀 release + runs-on: ubuntu-latest + steps: + - name: 📚 checkout + uses: actions/checkout@v2.1.1 + - name: 🟢 node + uses: actions/setup-node@v1.4.2 + with: + node-version: 12 + registry-url: https://registry.npmjs.org + - name: 🚀 publish + run: npm publish --access public + working-directory: my-package + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}