44 lines
1 KiB
YAML
44 lines
1 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
HUSKY: 0
|
|
|
|
jobs:
|
|
main:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: nrwl/nx-set-shas@v3
|
|
- run: npm ci
|
|
|
|
- run: npx nx format:check
|
|
- run: npx nx affected -t lint --parallel=3
|
|
- run: npx nx affected -t test --parallel=3 --configuration=ci
|
|
- run: npx nx affected -t build --parallel=3
|
|
|
|
- name: Publish to npm
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
run: |
|
|
npx nx run-many --target release --all
|
|
|
|
create-github-release:
|
|
name: Create GitHub Release
|
|
runs-on: ubuntu-latest
|
|
needs: main
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- name: Create Release
|
|
run: gh release create ${{ github.ref }} --generate-notes
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|