-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (55 loc) · 1.66 KB
/
release.yaml
File metadata and controls
59 lines (55 loc) · 1.66 KB
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
name: Release
on:
merge_group:
branches:
- main
push:
branches:
- main
workflow_dispatch:
# Needed for semantic-release to create GitHub releases and publish to npm via OIDC
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
concurrency:
group: Release
cancel-in-progress: false
jobs:
release:
name: Release
environment: Release
# Ensure releases run only when code reaches main via GitHub Merge Queue, or when manually dispatched
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
cache: npm
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Check lint
run: npm run lint:check
- name: Check format
run: npm run format:check
- name: Run unit tests
run: npm test
- name: Semantic Release
if: ${{ github.event_name == 'push' }}
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Publish to NPM
run: npm publish --provenance
- name: Build studio templates
run: npm run templates:build-studio-templates
- name: Publish studio templates to NPM
run: npm run templates:publish-studio-templates