forked from UI5/webcomponents-react
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 2.19 KB
/
release.yml
File metadata and controls
74 lines (61 loc) · 2.19 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: 'Release'
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release Type: patch | minor | major'
required: true
default: 'patch'
jobs:
build-and-release:
if: github.actor == 'MarcusNotheis' || github.actor == 'vbersch' || github.actor == 'Lukas742'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
token: ${{ secrets.ACCESS_TOKEN }}
fetch-depth: 0
- name: Setup Node.js environment
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
- name: Install, test and build
run: |
yarn install
yarn test
yarn build
- name: publish
run: |
npm config set //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
git config user.email ${{ secrets.BOT_GIT_EMAIL }}
git config user.name ${{ secrets.BOT_GIT_USERNAME }}
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish ${{ github.event.inputs.release_type }} \
--conventional-graduate \
--create-release github
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Deploy Release Docs
run: yarn deploy:storybook
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Build Next Docs
run: yarn build:storybook
- name: Deploy Next Docs
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages # The branch the action should deploy to.
folder: .out # The folder the action should deploy.
target-folder: master
clean: true
- uses: actions/github-script@v4
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
script: |
const { readFileSync } = require('fs');
const { URL } = require('url');
const { version } = require('./lerna.json');
const script = require('./.github/createIssueCommentsForRelease.cjs');
console.log('Create issue comments for lerna version: ', version);
await script({github, context, core, version})