-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (61 loc) · 1.78 KB
/
js-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
### Usage notes ##
#
# Two things are needed:
#
# 1. configure path matching the package in the "Detect changes" step below.
# This allows to match a "package" idenfifier to changes in a subdirectory.
# e.g.:
# my-package: '**/my-package/**'
#
# 2. configure the package in .github/js-packages.json.
# This allows to define variables that will be used in the pipeline.
# e.g:
# {
# "my-package": {<-- the "package" identifier
# "name": "@neuroglia/my-package", <-- the actual name of the package on the registry
# "path": "./", <-- the path from where to run npm scripts and where angular.json is located
# }
# }
###
name: Continous integration entry point for JS
on:
push:
branches: [ main ]
paths:
- '**/*.Sdk.TypeScript/**'
pull_request:
branches: [ main ]
paths:
- '**/*.Sdk.TypeScript/**'
jobs:
changes:
# Skip if it's not running in the `neuroglia-io/framework` repo
if: github.repository == 'neuroglia-io/framework'
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
packages: ${{ steps.detection.outputs.changes }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Detect changes
id: detection
uses: dorny/paths-filter@v2
with:
filters: |
measurements: '**/Neuroglia.Measurements.Sdk.TypeScript/**'
- name: Defined output 'packages' as
run: echo "${{ steps.detection.outputs.changes }}"
pipeline:
needs: changes
strategy:
max-parallel: 1
fail-fast: false
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
uses: ./.github/workflows/js-package-pipeline.yml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
package: ${{ matrix.package }}