Skip to content

Release new version #642

Release new version

Release new version #642

Workflow file for this run

name: Release new version
on: workflow_dispatch
jobs:
prerequisites:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: "Test"
command: "test"
- name: "Lint"
command: "lint"
- name: "Stylelint"
command: "stylelint"
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Setup
uses: ./.github/actions/setup
with:
npm_token: ${{secrets.npm_token}}
- name: Run ${{matrix.name}}
shell: bash
run: yarn lerna run ${{matrix.command}} --since
release:
needs: prerequisites
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Setup
uses: ./.github/actions/setup
with:
npm_token: ${{secrets.npm_token}}
- uses: ./.github/actions/git-creds
- name: Run Build
shell: bash
run: yarn lerna run build --since --include-dependencies
- name: Generate new versions
run: yarn lerna version --conventional-commits -y
- run: yarn config set registry https://registry.npmjs.org/
- name: Setup .npmrc for publish
id: setup-npmrc
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > .npmrc
- name: Publish to npm
run: yarn lerna publish from-package -y
- name: Remove .npmrc
if: steps.setup-npmrc.outcome == 'success'
run: rm .npmrc