Skip to content

Commit

Permalink
meta: switch to semantic-release
Browse files Browse the repository at this point in the history
- Remove custom versioning workflows
- Add semantic-release configuration
- Update CONTRIBUTING.md with versioning details
- Add semantic-release dependencies

This change moves us from our custom date-based versioning to semantic versioning
using semantic-release. This will provide better clarity about the impact of
changes and automate our release process.
  • Loading branch information
Ismar Iljazovic committed Jan 21, 2025
1 parent e1125b4 commit d83e0da
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 210 deletions.
147 changes: 0 additions & 147 deletions .github/workflows/create-release-tag.yml

This file was deleted.

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

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/publish-release.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches: [main]

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Setup Git User
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
8 changes: 8 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
}
49 changes: 45 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Every contribution makes Windsurf better for everyone. Don't hesitate to:
```

Example commit messages:

- `git commit -m "add: add link to windsurf docs"`
- `git commit -m "update: improve clarity of installation steps"`
- `git commit -m "remove: remove old documentation"`
Expand All @@ -72,10 +73,12 @@ Every contribution makes Windsurf better for everyone. Don't hesitate to:
### Pull Request Requirements

1. **PR Content**:

- Write a clear title and description explaining your changes
- Link to any related issues

2. **Markdown Quality**: All markdown files must pass the markdownlint checks

- This is automatically checked by GitHub Actions
- It's also enforced by the pre-commit hook
- You can run checks manually using `npx markdownlint-cli2 "**/*.md"`
Expand All @@ -87,12 +90,50 @@ Every contribution makes Windsurf better for everyone. Don't hesitate to:

## Release Process

Our releases are managed through GitHub's native release system. PRs can only be merged to `main` through our merge queue when they are ready for release. This is enforced by requiring either:
Our releases are managed automatically by [semantic-release](https://semantic-release.gitbook.io/semantic-release). This means:

1. **Version Numbers**: We follow [Semantic Versioning](https://semver.org/) (MAJOR.MINOR.PATCH)

- PATCH (e.g., 1.0.0 -> 1.0.1): Backwards-compatible bug fixes
- MINOR (e.g., 1.0.0 -> 1.1.0): New content/features, backwards-compatible
- MAJOR (e.g., 1.0.0 -> 2.0.0): Breaking changes

2. **Commit Messages**: Your commit type determines the next version

- `fix: message` -> Patch release
- `feat: message` -> Minor release
- Any commit with `BREAKING CHANGE:` in its footer -> Major release

Examples:

```bash
# Patch release (1.0.0 -> 1.0.1)
git commit -m "fix: correct typo in installation guide"

# Minor release (1.0.0 -> 1.1.0)
git commit -m "feat: add new section on windsurfing spots"

# Major release (1.0.0 -> 2.0.0)
git commit -m "feat: reorganize entire documentation structure
BREAKING CHANGE: All sections have been reorganized with a new structure"
```

3. **Release Process**:

- Merging to `main` triggers a release check
- Changes are analyzed automatically
- Release notes are generated from commit messages
- A new GitHub release is created with the appropriate version
- Git tags are created automatically

- The `version-bump` label (added automatically for significant changes), or
- A commit message starting with `release:`
4. **What Gets Released**:
- Documentation fixes -> Patch version
- New content/sections -> Minor version
- Major reorganizations -> Major version
- Purely technical changes (like workflow updates) -> No version change

Note: All version management and releases are handled entirely by GitHub Actions. This ensures consistency across all contributors.
Note: All version management and releases are handled entirely by semantic-release through GitHub Actions. This ensures consistency across all contributors.

## Contributing Prompts

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "awesome-windsurf",
"description": "A curated hub of awesome Windsurf resources",
"version": "2024.12.10",
"private": false,
"devDependencies": {
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.0.0",
"@eslint/js": "^9.0.0",
"@kie/act-js": "^2.6.2",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/github": "^11.0.1",
"@semantic-release/release-notes-generator": "^14.0.3",
"cspell": "^8.17.2",
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
Expand All @@ -17,6 +19,7 @@
"markdown-link-check": "^3.13.6",
"markdownlint-cli2": "^0.17.2",
"prettier": "^3.1.1",
"semantic-release": "^24.0.1",
"shellcheck": "^3.0.0"
},
"scripts": {
Expand Down

0 comments on commit d83e0da

Please sign in to comment.