From 5629961d96b2d471cd9d5ca27b79811f42acb1d9 Mon Sep 17 00:00:00 2001 From: Jihye Park Date: Sat, 27 Mar 2021 20:46:16 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20modiy=20npm-publish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-publish.yml | 38 +++++++++++++++---------------- package.json | 1 - 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index de08dd7..355db3f 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -4,8 +4,9 @@ name: Node.js Package on: - release: - types: [created] + push: + branches: + - "master" jobs: build: @@ -22,26 +23,25 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + persist-credentials: false + - name: Setup Node.js - uses: actions/setup-node@v1 with: node-version: 12.18.0 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm run go - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - name: Setup Node.js + uses: actions/setup-node@v1 with: node-version: 12.18.0 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm run go + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Release env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release diff --git a/package.json b/package.json index 4152bda..eae344a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "scripts": { "commit": "git-cz", "build": "tsc", - "go": "npm run build && npm publish", "semantic-release": "semantic-release" }, "repository": {