build(ci): switch from travis to github actions
parent
c11917cf30
commit
a4d17234d4
@ -0,0 +1,44 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12'
|
||||
check-latest: true
|
||||
|
||||
# - name: Cache node modules
|
||||
# uses: actions/cache@v2
|
||||
# env:
|
||||
# cache-name: cache-node-modules
|
||||
# with:
|
||||
# path: ~/.npm
|
||||
# key: ${{ runner.os }}-node-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-node-${{ env.cache-name }}-
|
||||
# ${{ runner.os }}-node-
|
||||
# ${{ runner.os }}-
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build
|
||||
run: npm run build --if-present
|
||||
- name: Rename output dir
|
||||
run: mv build sergate
|
||||
- name: Make zip file
|
||||
run: zip -r -9 sergate.zip ./sergate -x .gitignore
|
||||
- name: Semantic release
|
||||
run: npx semantic-release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@ -1,15 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- lts/*
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
script:
|
||||
- npm run build
|
||||
|
||||
after_success:
|
||||
- mv build sergate
|
||||
- zip -r -9 sergate.zip ./sergate -x .gitignore
|
||||
- npx semantic-release
|
||||
|
||||
Loading…
Reference in New Issue