Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
workflow_run:
workflows: ["CI"]
types:
- completed
branches:
- master
workflow_dispatch:

permissions:
contents: write
id-token: write

jobs:
release:
name: Release to npm
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build packages
run: yarn build

- name: Publish to npm
if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn lerna publish from-package --yes --no-verify-access
10 changes: 9 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
"version": "independent",
"command": {
"version": {
"allowBranch": "master"
"allowBranch": "master",
"conventionalCommits": true,
"message": "chore(release): publish",
"push": true,
"createRelease": false
},
"publish": {
"ignoreChanges": ["**/*.md", "**/test/**", "**/*.test.*"],
"registry": "https://registry.npmjs.org/"
}
},
"ignoreChanges": ["**/*.md", "**/test/**"]
Expand Down