Skip to content

Commit 61d540c

Browse files
dutifulbobosolmaz
authored andcommitted
fix(release): align with skillflag release pattern + fix skillflag import
- release-it v17 → v19 (fixes Octokit null log crash) - in-memory version bump: fetch latest from npm, bump in CI working dir only, never commit to main (branch-protection compatible) - fix skillflag import: 'skillflag/dist/index.js' → 'skillflag' - bump skillflag dep to 0.1.3 (has proper package exports)
1 parent 10ab99a commit 61d540c

5 files changed

Lines changed: 31 additions & 11 deletions

File tree

.github/workflows/release.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ jobs:
3232
- run: git config user.email "github-actions[bot]@users.noreply.github.com"
3333
- run: npm ci
3434
- run: npm run lint
35-
- run: npm run release:ci -- --increment ${{ inputs.increment }}
35+
# Fetch latest version from npm, bump it, write to package.json.
36+
# Nothing is committed — the bumped version lives only in the CI
37+
# runner's working directory. release-it tags + publishes from it.
38+
- name: Bump version from npm registry
39+
run: |
40+
LATEST=$(npm view @simpledoc/simpledoc version 2>/dev/null || echo "0.0.0")
41+
echo "Latest on npm: $LATEST"
42+
npm version --no-git-tag-version "$LATEST" --allow-same-version
43+
npm version --no-git-tag-version ${{ inputs.increment }}
44+
VERSION=$(node -p 'require("./package.json").version')
45+
echo "Releasing: $VERSION"
46+
- name: Release
47+
run: |
48+
VERSION=$(node -p 'require("./package.json").version')
49+
npm run release:ci -- --increment "$VERSION"
3650
env:
3751
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
NPM_CONFIG_PROVENANCE: "true"

.release-it.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"git": {
3-
"requireCleanWorkingDir": true,
3+
"requireCleanWorkingDir": false,
44
"requireBranch": "main",
5-
"commitMessage": "chore(release): ${version}",
5+
"commit": false,
6+
"tag": true,
67
"tagName": "v${version}",
7-
"push": true
8+
"push": true,
9+
"pushArgs": ["--tags"]
810
},
911
"npm": {
12+
"allowSameVersion": true,
13+
"version": false,
1014
"publish": true,
11-
"skipChecks": true
15+
"skipChecks": true,
16+
"publishArgs": ["--provenance"]
1217
},
1318
"github": {
1419
"release": true,

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"dependencies": {
5252
"@clack/prompts": "^0.11.0",
5353
"commander": "^11.0.0",
54-
"skillflag": "^0.1.1"
54+
"skillflag": "^0.1.3"
5555
},
5656
"devDependencies": {
5757
"@eslint/js": "^9.0.0",

src/cli/skillflag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { handleSkillflag } from "skillflag/dist/index.js";
1+
export { handleSkillflag } from "skillflag";

0 commit comments

Comments
 (0)