-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 2 KB
/
release.yml
File metadata and controls
81 lines (67 loc) · 2 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Release
on:
workflow_dispatch:
push:
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
snapshot:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile
- name: Version packages (snapshot)
run: pnpm changeset version --snapshot snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: pnpm build
- name: Publish npm snapshots
run: pnpm changeset publish --tag snapshot
env:
NPM_CONFIG_PROVENANCE: true
release:
if: github.event_name == 'push'
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile
- name: Create release PR or publish
id: changesets
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
with:
publish: pnpm release
version: pnpm run version
title: 'chore: version packages'
commit: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
BUILD_NUMBER: ${{ github.run_number }}
publish-extensions:
needs: release
if: needs.release.outputs.published == 'true'
uses: ./.github/workflows/publish-extension.yml
secrets: inherit