mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-10 08:01:20 +00:00
Github Action: Publish to NPM (#308)
* Github Action: Publish to NPM * Delete .travis.yml * Update nodejs.yml
This commit is contained in:
30
.github/workflows/npmpublish.yml
vendored
Normal file
30
.github/workflows/npmpublish.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Node.js Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
|
||||
publish-npm:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm ci
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
15
.travis.yml
15
.travis.yml
@@ -1,15 +0,0 @@
|
||||
language: node_js
|
||||
cache: yarn
|
||||
jobs:
|
||||
include:
|
||||
- stage: npm release
|
||||
if: tag IS present
|
||||
node_js: stable
|
||||
script: yarn run build
|
||||
deploy:
|
||||
provider: npm
|
||||
email: "$NPM_EMAIL"
|
||||
api_key: "$NPM_TOKEN"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
Reference in New Issue
Block a user