Skip to content

Commit

Permalink
[REFORMAT] upgrade packages and new github action
Browse files Browse the repository at this point in the history
  • Loading branch information
kenriortega committed Feb 12, 2021
1 parent 8bdbbf3 commit 044417a
Show file tree
Hide file tree
Showing 3 changed files with 922 additions and 866 deletions.
42 changes: 36 additions & 6 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,48 @@
name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Configura el archivo .npmrc para publicar en npm
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "12.x"
registry-url: "https://registry.npmjs.org"
- run: npm install
node-version: 12.x
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm 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 ci
# - run: npm publish --access public
# 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: 14.x
registry-url: https://npm.pkg.github.com/
scope: '@kenriortega'
- run: npm ci
- run: echo registry=https://npm.pkg.github.com/kenriortega >> .npmrc
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.PUBLISH_GITHUB_TOKEN}}
Loading

0 comments on commit 044417a

Please sign in to comment.