Merge pull request #73 from cloudnc:chore/use-src-instead-of-build-wh… #100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Actions docs | |
# https://help.github.com/en/articles/about-github-actions | |
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
name: CI | |
on: [push] | |
jobs: | |
build: | |
# Machine environment: | |
# https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions#ubuntu-1804-lts | |
# We specify the Node.js version manually below, and use versioned Chrome from Puppeteer. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.9.0 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.9.0 | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --non-interactive --no-progress | |
- name: Lint Demo | |
run: yarn demo:lint:check | |
- name: Format check | |
run: yarn prettier:check | |
- name: Check Readme | |
run: yarn readme:check | |
- name: Build lib | |
run: yarn lib:build:prod | |
- name: Build app | |
run: yarn demo:build:prod | |
- name: Test | |
run: yarn lib:test:ci | |
- name: Coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
fail_ci_if_error: true # optional (default = false) | |
- name: Rebuild for release | |
if: contains('refs/heads/master refs/heads/next', github.ref) | |
run: | | |
yarn lib:build:prod | |
rm dist/ngx-observable-lifecycle/README.md && cp README.md dist/ngx-observable-lifecycle | |
cp LICENSE dist/ngx-observable-lifecycle | |
- name: Release | |
if: contains('refs/heads/master refs/heads/next', github.ref) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release |