Skip to content

Commit

Permalink
Merge pull request #72 from ichoosetoaccept/meta/switch-to-semantic-r…
Browse files Browse the repository at this point in the history
…elease

meta: switch to semantic-release
  • Loading branch information
ichoosetoaccept authored Jan 21, 2025
2 parents e1125b4 + 662afa6 commit 1206151
Show file tree
Hide file tree
Showing 25 changed files with 8,890 additions and 3,997 deletions.
30 changes: 15 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module.exports = {
'env': {
'node': true,
'es2021': true
},
'extends': 'eslint:recommended',
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
},
'rules': {
'indent': ['error', 4],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'always']
}
env: {
node: true,
es2021: true,
},
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
indent: ['error', 4],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
};
12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "weekly"
interval: 'weekly'
open-pull-requests-limit: 10
labels:
- "dependencies"
- 'dependencies'
commit-message:
prefix: "chore"
include: "scope"
prefix: 'chore'
include: 'scope'
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ changelog:
- meta
- title: Other Changes
labels:
- "*"
- '*'
4 changes: 4 additions & 0 deletions .github/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,22 @@ npm run test:workflow create-release-tag
### create-release-tag.yml

1. Manual Release

- Trigger: PR with commit message starting with "release:"
- Expected: Version bump, PR comment, success status

2. Automatic Release (Files Changed)

- Trigger: PR with >5 files changed
- Expected: Version bump, PR comment, pending status

3. Automatic Release (Commits Count)

- Trigger: PR with >10 commits since last release
- Expected: Version bump, PR comment, pending status

4. No Release Needed

- Trigger: PR with minimal changes
- Expected: No version bump, no PR comment

Expand Down
60 changes: 30 additions & 30 deletions .github/tests/mocks/github-api.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
// Mock GitHub API responses for testing
module.exports = {
// Mock PR data
pulls: {
get: {
data: {
number: 999,
head: {
sha: '0a97d696',
ref: 'test/manual-release'
},
base: {
ref: 'main'
},
labels: [],
title: 'Manual Release Test'
}
}
// Mock PR data
pulls: {
get: {
data: {
number: 999,
head: {
sha: '0a97d696',
ref: 'test/manual-release',
},
base: {
ref: 'main',
},
labels: [],
title: 'Manual Release Test',
},
},
// Mock commit data
repos: {
getCommit: {
data: {
commit: {
message: 'release: test manual release'
}
}
}
},
// Mock commit data
repos: {
getCommit: {
data: {
commit: {
message: 'release: test manual release',
},
},
},
// Track API calls for verification
calls: {
createComment: [],
createCommitStatus: []
}
},
// Track API calls for verification
calls: {
createComment: [],
createCommitStatus: [],
},
};
4 changes: 2 additions & 2 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
run: |
# Get all commit messages in the PR
commits=$(gh pr view $PR_NUMBER --json commits --jq '.commits[].messageHeadline')
# Check if any commit message starts with "release:"
if echo "$commits" | grep -q "^release:"; then
gh pr edit $PR_NUMBER --add-label "release"
Expand Down
147 changes: 0 additions & 147 deletions .github/workflows/create-release-tag.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/link-check.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/manual-release.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# This workflow ensures markdown files follow our style guide
# Logic:
# 1. Runs on every push and PR
# 1. Runs on every PR
# 2. Uses our local npm scripts for consistency
# 3. Attempts to auto-fix issues and commits them on PRs
# 4. Runs all markdown-related checks (lint, spell-check)

name: Markdown Lint

on:
push:
paths:
- '**/*.md'
pull_request:
paths:
- '**/*.md'
Expand Down
Loading

0 comments on commit 1206151

Please sign in to comment.