This repository has been archived by the owner on Aug 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (45 loc) · 1.6 KB
/
npm-publish.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
name: Yarn publish
on:
workflow_run:
workflows: [Build and Test]
types: [completed]
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies in react-components
run: yarn install
- name: Build package NPM package
run: yarn build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-gov-west-1
- name: Get NPM Token password
uses: marvinpinto/[email protected]
with:
ssm_parameter: /devops/VA_VSP_BOT_NPM_TOKEN
env_variable_name: VA_VSP_BOT_NPM_TOKEN
- name: Get Github Token password
uses: marvinpinto/[email protected]
with:
ssm_parameter: /devops/VA_VSP_BOT_GITHUB_TOKEN
env_variable_name: VA_VSP_BOT_GITHUB_TOKEN
- name: Run npx semantic-release, create Github Release, and Publish NPM package
run: npx semantic-release
env:
NPM_TOKEN: ${{ env.VA_VSP_BOT_NPM_TOKEN }}
GH_TOKEN: ${{ env.VA_VSP_BOT_GITHUB_TOKEN }}
- name: Publish build artifacts to NPM
run: yarn npm publish --access public --tolerate-republish
env:
YARN_NPM_AUTH_TOKEN: ${{ env.VA_VSP_BOT_NPM_TOKEN }}