-
Notifications
You must be signed in to change notification settings - Fork 28
53 lines (52 loc) · 1.71 KB
/
release.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
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release and publish module
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install dependencies
run: npm ci
- name: Build the project
run: npm run build:prod
- name: Run tests and do code coverage check
run: npm run test:coverage
- name: Upload code coverage report to codecov.io
uses: codecov/codecov-action@v3
- name: Upload Sonar report to sonarcloud.io
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=adobeinc
-Dsonar.projectKey=adobe_aem-react-editable-components
-Dsonar.sources=src
-Dsonar.tests=test
-Dsonar.javascript.lcov.reportPaths=dist/coverage/lcov.info
-Dsonar.coverage.exclusions=src/types.ts
- name: Release module and publish it in github.com and npmjs.com
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
run: npm run semantic-release
- name: Build documentation
run: npm run docs
- name: Publish documentation to github pages
uses: JamesIves/github-pages-deploy-action@v4.6.3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages-documentation
FOLDER: dist/docs