Skip to content

Commit

Permalink
chore: 🤖 modiy npm-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Jihye Park committed Mar 27, 2021
1 parent d8b9d0c commit 5629961
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
name: Node.js Package

on:
release:
types: [created]
push:
branches:
- "master"

jobs:
build:
Expand All @@ -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
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"scripts": {
"commit": "git-cz",
"build": "tsc",
"go": "npm run build && npm publish",
"semantic-release": "semantic-release"
},
"repository": {
Expand Down

0 comments on commit 5629961

Please sign in to comment.