зеркало из https://github.com/microsoft/satcheljs.git
Switch from Travis to GitHub Actions for CI and publishing (#152)
This commit is contained in:
Родитель
72b0c99a31
Коммит
b813c47d75
|
@ -0,0 +1,16 @@
|
|||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- run: yarn --frozen-lockfile
|
||||
- run: yarn build
|
||||
- run: yarn test
|
|
@ -0,0 +1,21 @@
|
|||
name: Publish
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build_and_publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: yarn
|
||||
- run: yarn build
|
||||
- run: yarn test
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
30
.travis.yml
30
.travis.yml
|
@ -1,30 +0,0 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
before_install:
|
||||
- npm config set spin false
|
||||
- npm i -g makeshift && makeshift -r https://registry.npmjs.org
|
||||
install:
|
||||
- yarn
|
||||
script:
|
||||
- yarn build
|
||||
- yarn test
|
||||
deploy:
|
||||
- provider: npm
|
||||
skip_cleanup: true
|
||||
email: kchau@microsoft.com
|
||||
api_key: $NPM_TOKEN
|
||||
tag: latest
|
||||
on:
|
||||
tags: true
|
||||
condition: >
|
||||
"$TRAVIS_TAG" != *"-"*
|
||||
- provider: npm
|
||||
skip_cleanup: true
|
||||
email: kchau@microsoft.com
|
||||
api_key: $NPM_TOKEN
|
||||
tag: next
|
||||
on:
|
||||
tags: true
|
||||
condition: >
|
||||
"$TRAVIS_TAG" == *"-"*
|
Загрузка…
Ссылка в новой задаче