-
Notifications
You must be signed in to change notification settings - Fork 6
78 lines (64 loc) · 2.13 KB
/
release-prepare.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Prepare Vivid for release
permissions:
contents: read
packages: read
on:
workflow_dispatch:
inputs:
version:
description: 'Version to bump to'
required: false
jobs:
prepare-verify:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
token: ${{ secrets.VNG_VVD_PAT }}
- name: Use Node.js 14
uses: actions/setup-node@v4
with:
node-version: 14
registry-url: https://npm.pkg.github.com
- name: Install yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install --network-timeout 100000
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Update to a new version
- name: Extract release version manually set
if: ${{ github.event.inputs.version }}
run: echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Obtain release version if not manually set
if: ${{ !(env.RELEASE_VERSION) }}
run: echo "RELEASE_VERSION=$(node ./scripts/suggest-bump.mjs)" >> $GITHUB_ENV
- name: Bump version to ${{ env.RELEASE_VERSION }}
run: |
yarn lerna version ${{ env.RELEASE_VERSION }} --force-publish --no-git-tag-version --no-push --exact --yes
yarn changelog
# Build & Test with new version
- name: Build components
run: yarn compile
- name: Lint sources
run: yarn lint
- name: Test components
run: yarn test:prepublish
# Push updated/created content to remote and Tag version
- name: Push changes
run: |
git fetch
git config user.email "vivid@vonage.com"
git config user.name "Vivid"
git add --all
git commit -m "update versions to ${{ env.RELEASE_VERSION }}"
git push
- name: Tag release
run: |
git tag -a v${{ env.RELEASE_VERSION }} -m "tag release v${{ env.RELEASE_VERSION }}"
git push --follow-tags