forked from Refinitiv/refinitiv-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.35 KB
/
prod_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
name: Production Release
on:
workflow_dispatch:
inputs:
force:
description: Force publish all packages?
type: boolean
jobs:
publish:
environment:
name: production
url: https://ui.refinitiv.com
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Pulls all commits (needed for Lerna)
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Gather resources and build
uses: ./.github/actions/checkout-install-and-build
- name: Bump all package versions and create GitHub release
if: ${{ github.event.inputs.force }}
run: lerna version --create-release github --conventional-commits --conventional-graduate --force-publish --yes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Bump modified package versions and create GitHub release
if: ${{ !github.event.inputs.force }}
run: lerna version --create-release github --conventional-commits --conventional-graduate --yes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Publish to NPM
run: lerna publish from-git --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}