Skip to content

Commit 6068246

Browse files
author
Ben Jervis
authored
Add a snapshots workflow (#770)
1 parent f33b6a5 commit 6068246

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/snapshot.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Snapshot
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
publish:
7+
name: Publish snapshot version
8+
runs-on: ubuntu-latest
9+
env:
10+
CI: true
11+
steps:
12+
- uses: pnpm/[email protected]
13+
with:
14+
version: 6.23.1
15+
16+
- name: Checkout Repo
17+
uses: actions/checkout@main
18+
with:
19+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
20+
fetch-depth: 0
21+
token: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@main
25+
with:
26+
node-version-file: '.nvmrc'
27+
cache: 'pnpm'
28+
29+
- name: Install Dependencies
30+
run: pnpm i
31+
32+
- name: Publish
33+
uses: seek-oss/changesets-snapshot@v0
34+
with:
35+
pre-publish: pnpm prepare-release
36+
env:
37+
NPM_TOKEN: ${{ secrets.SEEK_OSS_CI_NPM_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"lint": "manypkg check && prettier --check . && tsc",
1919
"copy-readme-to-packages": "ts-node scripts/copy-readme-to-packages",
2020
"version": "changeset version && pnpm install --lockfile-only",
21-
"release": "pnpm copy-readme-to-packages && pnpm build && changeset publish"
21+
"prepare-release": "pnpm copy-readme-to-packages && pnpm build",
22+
"release": "pnpm prepare-release && changeset publish"
2223
},
2324
"preconstruct": {
2425
"packages": [

0 commit comments

Comments
 (0)