-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.58 KB
/
Copy pathrelease.yml
File metadata and controls
58 lines (47 loc) · 1.58 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
name: Release
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish (e.g. v0.1.0)'
required: true
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
# Matches the DeepSeek Harness toolchain version.
version: 11.7.0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile=false
- name: Typecheck
run: pnpm run typecheck
- name: Build
run: pnpm run build
# The published tarball must not depend on a build script the consumer
# cannot run, so the build happens here rather than at install time.
- name: Check the committed build matches the sources
run: |
if [ -n "$(git status --porcelain lib)" ]; then
echo "::error::lib/ is out of date. Run 'pnpm run build' and commit the result."
git --no-pager diff lib
exit 1
fi
- name: Verify the tarball contents
run: |
npm pack --dry-run 2>&1 | tee pack.txt
grep -q "lib/index.js" pack.txt || { echo "::error::lib/index.js missing from the package"; exit 1; }
grep -q "cordis.patch.yml" pack.txt || { echo "::error::cordis.patch.yml missing from the package"; exit 1; }
- run: pnpm publish --access public --no-git-checks