-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (50 loc) · 1.43 KB
/
Copy pathpublish.yml
File metadata and controls
63 lines (50 loc) · 1.43 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Publish (OIDC)
on:
push:
branches:
- main
release:
types:
- published
concurrency:
group: npm-publish-${{ github.ref }}
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: pnpm
- name: Install
run: pnpm -w install --frozen-lockfile --prod=false
- name: Set version (@next)
if: github.event_name == 'push'
run: node ./scripts/set-next-version.mjs
- name: Set version (release tag)
if: github.event_name == 'release'
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: node ./scripts/set-release-version.mjs
- name: Build core
run: pnpm -C packages/core build
- name: Publish @next
if: github.event_name == 'push'
working-directory: packages/core
run: npm publish --tag next --access public --ignore-scripts
- name: Publish release
if: github.event_name == 'release'
working-directory: packages/core
run: npm publish --access public --ignore-scripts