Skip to content

Bump Rancher Components version number #10

Bump Rancher Components version number

Bump Rancher Components version number #10

name: Build and Publish Rancher Components
on:
push:
tags:
- 'components-v*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
scope: '@rak-phillip'
- name: Install
run: yarn install:ci
- name: Lint
run: yarn lint:lib
- name: Build
run: yarn build:lib
- name: Unit Test
run: yarn test:ci ./pkg/rancher-components
- name: Publish to npm
run: |
if [[ $GITHUB_REF_NAME == components-v*alpha.* ]]; then
yarn publish:lib --tag alpha --dry-run
elif [[ $GITHUB_REF_NAME == components-v*beta.* ]]; then
yarn publish:lib --tag beta --dry-run
else
yarn publish:lib --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}