Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Commit

Permalink
Added publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipe Ferreira committed Nov 19, 2019
1 parent ed4a95e commit 945164d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/master.yml
Expand Up @@ -8,21 +8,12 @@ jobs:
name: master
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 10.16.3
- run: npm install
- run: npm run test:coveralls
- run: npm run build
- name: Publish if version has been updated
uses: pascalgn/npm-publish-action@51fdb4531e99aac1873764ef7271af448dc42ab4
with:
tag_name: "v%s"
tag_message: "v%s"
commit_pattern: "^Release (\\S+)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: '10.x'
- run: npm install
- run: npm run test:coveralls
- run: npm run build
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,25 @@
name: publish
on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 945164d

Please sign in to comment.