Skip to content

chore: update release flow #21

chore: update release flow

chore: update release flow #21

Workflow file for this run

name: Monorepo Release
on:
push:
branches:
- master
jobs:
monorepo_release:
name: Monorepo Semantic Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Authenticate to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install dependencies
run: npm install
- name: Run Semantic Release for Monorepo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
publish_admin_ui:
name: Publish Admin UI
needs: monorepo_release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Authenticate to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install admin-ui dependencies
run: yarn --prefix apps/admin-ui
- name: Publish Admin UI to npm
run: |
cd apps/admin-ui
npm version patch
npm publish --access public
publish_course:
name: Publish Course
needs: monorepo_release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Authenticate to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install course dependencies
run: npm install --prefix apps/course
- name: Publish Course to npm
run: |
cd apps/course
npm version patch
npm publish --access public