Skip to content

Commit 3d0b66c

Browse files
authored
Consolidate release workflows for OIDC publishing (#1669)
1 parent 66b5ad8 commit 3d0b66c

5 files changed

Lines changed: 39 additions & 44 deletions

File tree

.github/workflows/release.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- master
7+
workflow_dispatch:
78

89
jobs:
910
release:
1011
name: Publish & Deploy
12+
if: github.event_name == 'push'
1113
runs-on: ubuntu-latest
1214
env:
1315
CI: true
@@ -37,4 +39,34 @@ jobs:
3739
publish: pnpm release
3840
env:
3941
GITHUB_TOKEN: ${{ secrets.VANILLA_EXTRACT_CI_GITHUB_TOKEN }}
40-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
43+
snapshot:
44+
name: Publish snapshot version
45+
runs-on: ubuntu-latest
46+
env:
47+
CI: true
48+
steps:
49+
- name: Checkout Repo
50+
uses: actions/checkout@v6
51+
with:
52+
fetch-depth: 0
53+
token: ${{ secrets.VANILLA_EXTRACT_CI_GITHUB_TOKEN }}
54+
55+
- name: Set up PNPM
56+
uses: pnpm/action-setup@v4
57+
58+
- name: Set up Node.js
59+
uses: actions/setup-node@v6
60+
with:
61+
node-version-file: '.nvmrc'
62+
cache: 'pnpm'
63+
64+
- name: Install Dependencies
65+
run: pnpm install
66+
67+
- name: Publish
68+
uses: seek-oss/changesets-snapshot@v0
69+
with:
70+
pre-publish: pnpm prepare-release
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/snapshot.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/validate.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
matrix:
99
# Blank string allows us to test against version in nvmrc file
1010
# configured in 'Set up Node.js' down below.
11-
node: ['', '24']
12-
name: Lint & Test (${{ (matrix.node && matrix.node != '24') && format('node {0}', matrix.node) || matrix.node || 'nvmrc' }})
11+
node: ['', '22']
12+
name: Lint & Test (${{ (matrix.node && matrix.node != '22') && format('node {0}', matrix.node) || matrix.node || 'nvmrc' }})
1313
runs-on: ubuntu-latest
1414
env:
1515
CI: true
@@ -43,8 +43,8 @@ jobs:
4343
matrix:
4444
# Blank string allows us to test against version in nvmrc file
4545
# configured in 'Set up Node.js' down below.
46-
node: ['', '24']
47-
name: Windows Tests (${{ (matrix.node && matrix.node != '24') && format('node {0}', matrix.node) || matrix.node || 'nvmrc' }})
46+
node: ['', '22']
47+
name: Windows Tests (${{ (matrix.node && matrix.node != '22') && format('node {0}', matrix.node) || matrix.node || 'nvmrc' }})
4848
runs-on: windows-latest
4949
env:
5050
CI: true

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/jod
1+
lts/krypton

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test:unit": "pnpm test:jest && pnpm test:vitest",
1717
"test:jest": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
1818
"test:vitest": "vitest --watch=false",
19-
"test:playwright": "NODE_OPTIONS=--no-experimental-fetch pnpm test:build-next && playwright test",
19+
"test:playwright": "pnpm test:build-next && playwright test",
2020
"test:build-next": "node scripts/copy-next-plugin.ts && pnpm --filter=@fixtures/next-* clean-build",
2121
"format": "prettier --write .",
2222
"lint": "pnpm run '/^lint:.*/'",

0 commit comments

Comments
 (0)