Skip to content

RID-4898 update release.yml spec & yarn steps #78

RID-4898 update release.yml spec & yarn steps

RID-4898 update release.yml spec & yarn steps #78

Workflow file for this run

name: CI
env:
NODE_VERSION: 18.0.0
RUNID_VERSION_SUFFIX: ${{ github.run_id }}.${{ github.run_attempt }}
on:
workflow_dispatch:
pull_request:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js v${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Enable Corepack
run: corepack enable
- name: Prepare Yarn 3.4.1
run: corepack prepare [email protected] --activate
- name: Install package dependencies
run: |
cd package
yarn install --frozen-lockfile
- name: Audit
run: |
cd package
yarn npm audit
- name: Lint
run: |
cd package
yarn lint
- name: Build
run: |
cd package
yarn build
- name: Test
run: |
cd package
yarn test
- name: Pack
run: |
cd package/dist
PACKAGE_VERSION=$(yarn ci-version)
yarn pack --filename ../transmitsecurity-riskid-reactjs-ts-v$PACKAGE_VERSION.tgz
cd ..
- name: Archive NPM package
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
retention-days: 30
name: react-ts-riskid-npm-package
path: package/transmitsecurity-riskid-reactjs-ts-v*.tgz
- name: Archive failure data
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failure-data
path: |
/home/runner/.npm/_logs