@r5n/sisyphus 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,18 +21,25 @@ jobs:
21
21
  - uses: actions/checkout@v7
22
22
  with:
23
23
  fetch-depth: 0
24
+ # pull_request:closed checks out an ephemeral merge ref; release tags must bind to the merged commit.
25
+ ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }}
24
26
 
25
27
  - uses: oven-sh/setup-bun@v2
26
28
 
29
+ - name: Resolve release state path
30
+ run: echo "SIS_RELEASE_DIR=$(git rev-parse --git-path sisyphus/release)" >> "$GITHUB_ENV"
31
+
32
+ # The cache key is sha-free and ref-stable so a workflow_dispatch recovery run
33
+ # restores the state saved by the failed merge-triggered run.
27
34
  - name: Restore release state
28
35
  uses: actions/cache/restore@v5
29
36
  with:
30
- path: .git/sisyphus/release
31
- key: sisyphus-release-${{ runner.os }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
32
- restore-keys: sisyphus-release-${{ runner.os }}-${{ github.sha }}-
37
+ path: ${{ env.SIS_RELEASE_DIR }}
38
+ key: sisyphus-release-${{ runner.os }}-${{ github.event.pull_request.base.ref || github.ref_name }}-${{ github.run_id }}-${{ github.run_attempt }}
39
+ restore-keys: sisyphus-release-${{ runner.os }}-${{ github.event.pull_request.base.ref || github.ref_name }}-
33
40
 
34
41
  - name: Remove cached release lock
35
- run: rm -f .git/sisyphus/release/.write.lock .git/sisyphus/release/.write.lock.*.owner .git/sisyphus/release/.write.lock.*.claim
42
+ run: rm -f "$SIS_RELEASE_DIR/.write.lock" "$SIS_RELEASE_DIR"/.write.lock.*.owner "$SIS_RELEASE_DIR"/.write.lock.*.claim
36
43
 
37
44
  - uses: actions/setup-node@v6
38
45
  with:
@@ -50,7 +57,7 @@ jobs:
50
57
 
51
58
  - name: Publish release
52
59
  run: |
53
- if [ -f .git/sisyphus/release/active.json ]; then
60
+ if [ -f "$SIS_RELEASE_DIR/active.json" ]; then
54
61
  sis roll --resume
55
62
  else
56
63
  sis roll --publish-only --yes
@@ -63,5 +70,5 @@ jobs:
63
70
  if: always()
64
71
  uses: actions/cache/save@v5
65
72
  with:
66
- path: .git/sisyphus/release
67
- key: sisyphus-release-${{ runner.os }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
73
+ path: ${{ env.SIS_RELEASE_DIR }}
74
+ key: sisyphus-release-${{ runner.os }}-${{ github.event.pull_request.base.ref || github.ref_name }}-${{ github.run_id }}-${{ github.run_attempt }}
@@ -12,13 +12,18 @@ release:
12
12
  - apk add --no-cache git nodejs npm
13
13
  - rm -f .git/sisyphus/release/.write.lock .git/sisyphus/release/.write.lock.*.owner .git/sisyphus/release/.write.lock.*.claim
14
14
  - npm install --global npm@11.5.1
15
- - npm config set //registry.npmjs.org/:_authToken "$NPM_TOKEN"
15
+ - |
16
+ if [ -n "$NPM_TOKEN" ]; then
17
+ npm config set //registry.npmjs.org/:_authToken "$NPM_TOKEN"
18
+ else
19
+ echo "NPM_TOKEN is not set; npm publishing will fail without registry authentication" >&2
20
+ fi
16
21
  # release.tags / release.push need a push credential: CI_JOB_TOKEN cannot push, and Sisyphus
17
22
  # rejects the token-embedded checkout URL. Set SIS_PUSH_TOKEN (project access token with
18
23
  # write_repository scope) as a masked CI/CD variable to enable tag and branch pushes.
19
24
  - |
20
25
  if [ -n "$SIS_PUSH_TOKEN" ]; then
21
- git remote set-url origin "https://${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
26
+ git remote set-url origin "${CI_SERVER_URL}/${CI_PROJECT_PATH}.git"
22
27
  git config credential.helper '!f() { echo "username=oauth2"; echo "password=${SIS_PUSH_TOKEN}"; }; f'
23
28
  fi
24
29
  rules:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  },
32
32
  "type": "module",
33
33
  "types": "src/cli.ts",
34
- "version": "0.9.0"
34
+ "version": "0.9.1"
35
35
  }
package/schema.json CHANGED
@@ -23,28 +23,20 @@
23
23
  "lastStone": {
24
24
  "type": "object",
25
25
  "additionalProperties": false,
26
- "required": ["commit", "date"],
27
26
  "properties": { "commit": { "type": "string" }, "date": { "type": "string" } }
28
27
  },
29
28
  "commit": {
30
29
  "type": "object",
31
30
  "additionalProperties": false,
32
- "required": ["author", "message"],
33
31
  "properties": {
34
32
  "author": { "type": "string" },
35
- "email": { "type": "string" },
33
+ "email": { "type": "string", "pattern": "^[^\\s<>@]+@[^\\s<>@]+\\.[^\\s<>@]+$" },
36
34
  "message": { "type": "string", "minLength": 1 }
37
- },
38
- "if": { "properties": { "author": { "pattern": "\\S" } } },
39
- "then": {
40
- "required": ["email"],
41
- "properties": { "email": { "pattern": "^[^\\s<>@]+@[^\\s<>@]+\\.[^\\s<>@]+$" } }
42
35
  }
43
36
  },
44
37
  "release": {
45
38
  "type": "object",
46
39
  "additionalProperties": false,
47
- "required": ["createRelease", "npm", "push", "tags"],
48
40
  "properties": {
49
41
  "createRelease": { "type": "boolean" },
50
42
  "npm": { "type": "boolean" },
@@ -55,7 +47,6 @@
55
47
  "changelog": {
56
48
  "type": "object",
57
49
  "additionalProperties": false,
58
- "required": ["append", "filename", "generate", "packageHeader", "root", "rootHeader", "sections"],
59
50
  "properties": {
60
51
  "append": { "type": "boolean" },
61
52
  "filename": { "type": "string", "minLength": 1 },
@@ -67,21 +58,6 @@
67
58
  "sections": {
68
59
  "type": "object",
69
60
  "additionalProperties": false,
70
- "required": [
71
- "breaking",
72
- "build",
73
- "chore",
74
- "ci",
75
- "dependencies",
76
- "docs",
77
- "feat",
78
- "fix",
79
- "other",
80
- "perf",
81
- "refactor",
82
- "style",
83
- "test"
84
- ],
85
61
  "properties": {
86
62
  "breaking": { "type": "string" },
87
63
  "build": { "type": "string" },
@@ -103,7 +79,6 @@
103
79
  "scripts": {
104
80
  "type": "object",
105
81
  "additionalProperties": false,
106
- "required": ["pre", "post"],
107
82
  "properties": {
108
83
  "pre": { "type": "object", "additionalProperties": { "type": "string" } },
109
84
  "post": { "type": "object", "additionalProperties": { "type": "string" } }
@@ -112,12 +87,10 @@
112
87
  "commits": {
113
88
  "type": "object",
114
89
  "additionalProperties": false,
115
- "required": ["skip"],
116
90
  "properties": {
117
91
  "skip": {
118
92
  "type": "object",
119
93
  "additionalProperties": false,
120
- "required": ["authors", "messagePatterns"],
121
94
  "properties": {
122
95
  "authors": { "type": "array", "items": { "type": "string" } },
123
96
  "messagePatterns": { "type": "array", "items": { "type": "string" } }
@@ -128,13 +101,11 @@
128
101
  "pr": {
129
102
  "type": "object",
130
103
  "additionalProperties": false,
131
- "required": ["labelMapping", "skip"],
132
104
  "properties": {
133
105
  "labelMapping": { "type": "object", "additionalProperties": { "enum": ["major", "minor", "patch"] } },
134
106
  "skip": {
135
107
  "type": "object",
136
108
  "additionalProperties": false,
137
- "required": ["authors", "labels", "titlePatterns"],
138
109
  "properties": {
139
110
  "authors": { "type": "array", "items": { "type": "string" } },
140
111
  "labels": { "type": "array", "items": { "type": "string" } },
@@ -146,14 +117,12 @@
146
117
  "currentRelease": {
147
118
  "type": "object",
148
119
  "additionalProperties": false,
149
- "required": ["packages", "planHash", "sourceHash", "stoneIds", "timestamp"],
150
120
  "properties": {
151
121
  "packages": {
152
122
  "type": "object",
153
123
  "additionalProperties": {
154
124
  "type": "object",
155
125
  "additionalProperties": false,
156
- "required": ["oldVersion", "newVersion"],
157
126
  "properties": {
158
127
  "oldVersion": { "type": "string", "minLength": 1 },
159
128
  "newVersion": { "type": "string", "minLength": 1 }