Skip to content
This repository has been archived by the owner on May 1, 2022. It is now read-only.

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
qinezh committed Nov 22, 2019
1 parent 5efaca0 commit 40883a4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Node.js Package

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: npm run test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm run ci-publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: 'qinezh'
- run: npm run ci-publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"typescript": "^3.2.2"
},
"scripts": {
"prepare": "npm run build",
"build": "tsc",
"test": "jest",
"ci-publish": "ci-publish"
Expand Down

0 comments on commit 40883a4

Please sign in to comment.