Skip to content

Commit

Permalink
ci: use github actions instead of travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Neonox31 committed Oct 6, 2023
1 parent 8b2058c commit 4560cad
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/angular.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
workflow_call:

env:
NODE_JS_VERSION: 12

jobs:
install-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_JS_VERSION}}
cache: 'yarn'
- uses: actions/cache@v3
with:
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'
- run: yarn config get cacheFolder
- run: yarn --frozen-lockfile

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_JS_VERSION}}
cache: 'yarn'
- uses: actions/cache@v3
with:
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'
- run: yarn config get cacheFolder
- run: yarn --frozen-lockfile
- run: yarn lint
needs:
- install-deps

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_JS_VERSION}}
cache: 'yarn'
- uses: actions/cache@v3
with:
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: '**/node_modules'
- run: yarn --frozen-lockfile
- run: yarn build:lib
- run: yarn build:demo --base-href "/ngx-openlayers/" --progress false
needs:
- install-deps
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
push:
tags:
- '*'

jobs:
workflow:
uses: ./.github/workflows/angular.yml
release-on-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_JS_VERSION}}
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- run: cp projects/ngx-openlayers/CHANGELOG.md dist/ngx-openlayers/CHANGELOG.md
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
needs:
- build
6 changes: 6 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
on:
push:

jobs:
workflow:
uses: ./.github/workflows/angular.yml

0 comments on commit 4560cad

Please sign in to comment.