Skip to content

Commit 50bdfcf

Browse files
committed
dev: switch to pnpm publish mechanism
Use 'pnpm publish' instead of 'lerna publish' as lerna seems to have problems in CI. Also allows the GH action to skip release and/or push back of the version update to the repository.
1 parent 3611ca3 commit 50bdfcf

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/publish.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@ on:
77
type: "string"
88
description: "version (e.g. 3.4.0-alpha.0)"
99
required: true
10+
skip_publish:
11+
type: "boolean"
12+
description: "mark in case only the version update shall be executed, skipping the release to npm"
13+
required: true
14+
skip_push:
15+
type: "boolean"
16+
description: "mark in case the version update shall not be pushed back to the repository"
17+
required: true
1018
stable_release:
1119
type: "boolean"
12-
description: "mark in case this is a full stable release"
20+
description: "mark in case this is a full stable release (flag is ignored in case publish is skipped)"
1321
required: true
1422

1523
jobs:
@@ -65,11 +73,13 @@ jobs:
6573
git tag v${{ github.event.inputs.next_version }} -f
6674
6775
- name: "Publish to npm"
68-
run: "pnpm exec lerna publish from-git --yes ${{ github.event.inputs.stable_release == 'true' && ' ' || '--dist-tag next' }}"
76+
if: "github.event.inputs.skip_publish == 'false'"
77+
run: "pnpm publish --recursive ${{ github.event.inputs.stable_release == 'true' && ' ' || '--tag next' }}"
6978
env:
7079
NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}"
7180

7281
- name: "push"
82+
if: "github.event.inputs.skip_push == 'false'"
7383
run: |
7484
git push
7585
git push origin v${{ github.event.inputs.next_version }}

0 commit comments

Comments
 (0)