-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.41 KB
/
release-components.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
name: Release Components
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
path: components
config-file: components/release-please-config.json
manifest-file: components/.release-please-manifest.json
include-component-in-tag: true
target-branch: main
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.components--release_created }}
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.components--release_created }}
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v4
if: ${{ steps.release.outputs.components--release_created }}
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('components/**/package-lock.json') }}
- name: Build
if: ${{ steps.release.outputs.components--release_created }}
run: |
npm ci
npm run build
working-directory: components
- name: Publish
if: ${{ steps.release.outputs.components--release_created }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
working-directory: components