-
-
Notifications
You must be signed in to change notification settings - Fork 103
37 lines (30 loc) · 913 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: ' 🚀 Publish: 2. Publish to NPM (automatic)'
on:
release:
types:
- published
workflow_dispatch:
workflow_call:
secrets:
PUBLISH_NPM:
required: true
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup and Build
uses: ./.github/actions/install-build
- name: Version
run: |
echo "VERSION=$(jq .version lerna.json)" >> $GITHUB_ENV
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{secrets.PUBLISH_NPM}}
DIST_TAG: ${{ contains(env.VERSION, 'alpha') && '--dist-tag next' || '' }}
NPM_CONFIG_PROVENANCE: true
run: pnpm lerna publish from-package --no-push --no-private --yes ${{ env.DIST_TAG }}