-
Notifications
You must be signed in to change notification settings - Fork 69
105 lines (87 loc) · 2.91 KB
/
Copy pathrelease.yml
File metadata and controls
105 lines (87 loc) · 2.91 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Release
on:
push:
branches:
- main
- next
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
# Publish gate: release.yml is the only workflow that runs on pushes to
# next, so without this job a push publishes to npm with zero tests run.
test:
name: Test
runs-on: ubuntu-latest
env:
# Preinstalled Chrome on GitHub's ubuntu images; the example suites
# default to the macOS app path when unset.
CHROME_BIN: /usr/bin/google-chrome
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
# https://github.com/pnpm/pnpm/issues/8953
version: 9.15.3
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
- name: Install Dependencies
run: pnpm i --frozen-lockfile
- name: Build plugin
run: pnpm run build
- name: SSR suite
working-directory: examples/ssr
run: pnpm run test
- name: CSS matrix suite
working-directory: examples/css-matrix
run: pnpm run test
- name: Start SSR suite
working-directory: examples/start-ssr
run: pnpm run test
- name: Start client suite
working-directory: examples/start-client
run: pnpm run test
- name: Start env suite
working-directory: examples/start-env
run: pnpm run test
# Publishes @solidjs/vite-plugin (the workspace root — the only public
# workspace package; examples are private and legacy-stub/ is outside the
# workspace, so nothing else can be published from here).
#
# npm trusted publishing (OIDC) can only be registered on an EXISTING
# package, so the FIRST publish under the @solidjs/vite-plugin name must be
# a manual `npm publish` by the maintainer, followed by registering this
# repo/workflow as the trusted publisher on npmjs.com. Until that npm-side
# setup is done, the publish step below fails with an npm auth/404 error —
# tests and the Version Packages PR flow still work.
release:
name: Release
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
# https://github.com/pnpm/pnpm/issues/8953
version: 9.15.3
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
registry-url: "https://registry.npmjs.org"
- name: Install Dependencies
run: pnpm i --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}