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

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
NewFuture committed Sep 6, 2019
1 parent 5bd40af commit 0e35845
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
node-version: 12
- run: npm i
- run: npm test
- run: '[[ $GITHUB_REF == refs/tags/v* ]] || [[ $GITHUB_REF == refs/tags/V* ]]'
- run: 'sed -i "s/^\(\W*version\W*\).*\(\W,\)$/\1${GITHUB_REF:11}\2/" package.json'

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: '[[ $GITHUB_REF == refs/tags/v* ]] || [[ $GITHUB_REF == refs/tags/V* ]]'
- run: 'sed -i "s/^\(\W*version\W*\).*\(\W,\)$/\1${GITHUB_REF:11}\2/" package.json'
with:
node-version: 12
registry-url: https://registry.npmjs.org/
Expand All @@ -38,8 +38,6 @@ jobs:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: "@newfuture"
- run: '[[ $GITHUB_REF == refs/tags/v* ]] || [[ $GITHUB_REF == refs/tags/V* ]]'
- run: 'sed -i "s/^\(\W*version\W*\).*\(\W,\)$/\1${GITHUB_REF:11}\2/" package.json'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
24 changes: 12 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ node_js:
# git:
# depth: 1

before_deploy:
- "[[ $TRAVIS_TAG == v* ]] || [[ $TRAVIS_TAG == V* ]]"
- sed -i "s/^\(\W*version\W*\).*\(\W,\)$/\1${TRAVIS_TAG:1}\2/" package.json
# before_deploy:
# - "[[ $TRAVIS_TAG == v* ]] || [[ $TRAVIS_TAG == V* ]]"
# - sed -i "s/^\(\W*version\W*\).*\(\W,\)$/\1${TRAVIS_TAG:1}\2/" package.json

deploy:
- provider: npm
email: [email protected]
api_key: "${NPM_TOKEN}"
skip_cleanup: true
on:
tags: true
branch: master
node_js: 'stable'
# deploy:
# - provider: npm
# email: [email protected]
# api_key: "${NPM_TOKEN}"
# skip_cleanup: true
# on:
# tags: true
# branch: master
# node_js: 'stable'

0 comments on commit 0e35845

Please sign in to comment.