Skip to content

Commit cdd7f02

Browse files
cmaurerclaude
andauthored
fix: updating build artifacts (#33)
* feat: add semantic-release for automated versioning and publishing - Add semantic-release with changelog and git plugins - Configure releases on master (full) and feature/* branches (prerelease) - Update GitHub Actions to run semantic-release after successful builds - Remove unused blanket.js coverage tool (replaced by nyc) - Update Gruntfile to remove blanket dependency Semantic-release will: - Analyze commits to determine version bump - Update package.json with new version - Generate/update CHANGELOG.md - Create GitHub release with release notes - Publish to npm 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: - adding test for invalid regex - removing unused files * fix: updating * feat(ci): add separate prerelease stage for non-master branches - Split release job into 'release' (master only) and 'prerelease' (all other branches) - Update .releaserc.json to support any branch as prerelease with wildcard pattern - Prerelease versions use branch name as identifier (e.g., 1.2.0-feature-foo.1) - Prereleases published to 'next' npm channel 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: updating * fix: updating * feat(ci): add pre-release stage for feature branches - Add pre-release job that runs on feature/* branches (not master) - Update .releaserc.json to specifically match feature/* branches - Prereleases strip 'feature/' prefix from version identifier - Example: feature/foo creates 1.2.0-foo.1 on 'next' npm channel 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: updating * fix: updating * fix: updating * fix: updating releaserc * fix: updating build artifacts --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b02d23a commit cdd7f02

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

.github/workflows/node.js.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
push:
1111
branches:
1212
- master
13-
- 'feature/*'
1413
pull_request:
1514
branches: [master]
1615

@@ -72,8 +71,5 @@ jobs:
7271
cache: 'npm'
7372
- name: Install dependencies
7473
run: npm ci --ignore-scripts
75-
- name: Run semantic-release
76-
run: npx semantic-release
77-
env:
78-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
74+
- name: Publish
75+
run: npm publish

.releaserc.json

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,32 @@
1010
"plugins": [
1111
"@semantic-release/commit-analyzer",
1212
"@semantic-release/release-notes-generator",
13-
["@semantic-release/changelog",
14-
{
15-
"changelogFile": "CHANGELOG.md"
16-
}],
17-
["@semantic-release/github",
13+
[
14+
"@semantic-release/changelog",
1815
{
19-
"assets": [
20-
{ "path": "src/relative.time.parser.js", "label": "JS distribution" }
21-
]
22-
}],
16+
"changelogFile": "CHANGELOG.md"
17+
}
18+
],
2319
[
24-
"@semantic-release/npm",
20+
"@semantic-release/github",
2521
{
26-
"npmPublish": true
22+
"assets": [
23+
{
24+
"path": "src/relative.time.parser.js",
25+
"label": "JS distribution"
26+
}
27+
]
2728
}
2829
],
2930
[
3031
"@semantic-release/git",
3132
{
32-
"assets": ["package.json", "CHANGELOG.md"],
33+
"assets": [
34+
"package.json",
35+
"CHANGELOG.md"
36+
],
3337
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
3438
}
35-
],
36-
"@semantic-release/github"
39+
]
3740
]
38-
}
41+
}

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"version": "1.1.1",
44
"description": "A moment.js plugin to convert relative time string into a moment.js object",
55
"main": "./src/relative.time.parser.js",
6+
"private": false,
7+
"publishConfig": {
8+
"access": "public",
9+
"provenance": true
10+
},
611
"scripts": {
712
"test": "grunt test",
813
"coverage": "nyc --reporter lcov --reporter text npm test",

0 commit comments

Comments
 (0)