chore: fix actions (#9)
* chore: fix actions * chore: fix tasks * chore: use secrets * chore: use secrets * chore: use travis * chore: debug: * chore: try local branch * chore: add if * chore: add obejct * chore: use env vars * chore: ... or develop
This commit is contained in:
Родитель
82e58d1d46
Коммит
f52a66a08e
|
@ -0,0 +1,36 @@
|
|||
name: Branch push
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install
|
||||
run: |
|
||||
npm install
|
||||
- name: Test
|
||||
run: |
|
||||
npm run test
|
||||
git checkout "${GITHUB_REF:11}"
|
||||
- name: Release
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
|
||||
env:
|
||||
TRAVIS: true
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
TRAVIS_BRANCH: "${GITHUB_REF:11}"
|
||||
run: |
|
||||
npm run semantic-release
|
|
@ -1,3 +0,0 @@
|
|||
/example
|
||||
/__tests__
|
||||
circle.yml
|
22
.travis.yml
22
.travis.yml
|
@ -1,22 +0,0 @@
|
|||
sudo: false
|
||||
language: node_js
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
notifications:
|
||||
email: false
|
||||
node_js:
|
||||
- '8'
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- git-core
|
||||
packages:
|
||||
- git
|
||||
before_script:
|
||||
- git fetch --unshallow origin refs/heads/master:refs/remotes/origin/master
|
||||
after_success:
|
||||
- npm run semantic-release
|
||||
branches:
|
||||
except:
|
||||
- "/^v\\d+\\.\\d+\\.\\d+(\\-.*)?$/"
|
|
@ -70,5 +70,6 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"jest-cli": "^21.0.1"
|
||||
}
|
||||
},
|
||||
"files": ["src", "index.d.ts", "index.js", "jest-preset.json"]
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче