Bump Rancher Components version number #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |