Skip to content

Commit

Permalink
Merge pull request #28 from ichoosetoaccept/feat/github-release-notes
Browse files Browse the repository at this point in the history
update: migrate to GitHub Releases with simplified labels
  • Loading branch information
ichoosetoaccept authored Dec 15, 2024
2 parents 9bab91c + e2c78d3 commit a4c773e
Show file tree
Hide file tree
Showing 22 changed files with 96 additions and 36 deletions.
18 changes: 18 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
changelog:
exclude:
labels:
- ignore-for-release
- duplicate
- wontfix
authors:
- dependabot
categories:
- title: 📚 Content
labels:
- content
- title: 🛠 Maintenance
labels:
- meta
- title: Other Changes
labels:
- "*"
22 changes: 20 additions & 2 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ name: Auto Release

on:
pull_request:
types: [opened, reopened, edited]
branches: [main, feature/update]
types: [opened, closed]
branches: [main]
schedule:
- cron: '0 0 * * *' # Run daily to check for needed releases

Expand Down Expand Up @@ -108,3 +108,21 @@ jobs:
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create tag and release
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'release:')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get version from package.json
VERSION=$(npm pkg get version | tr -d '"')
# Create and push tag
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
# Create GitHub Release with auto-generated notes
gh release create $VERSION \
--title "Release $VERSION" \
--generate-notes \
--target main
34 changes: 34 additions & 0 deletions .github/workflows/create-release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow creates git tags when release PRs are merged.
# It ensures that each release has a corresponding git tag,
# making it easier to track versions and generate changelogs.

name: Create Release Tag

on:
pull_request:
types: [closed]
branches: [main]

jobs:
create-tag:
# Only run this job if the PR was merged and has 'release:' in the title
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'release:')
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create and push tag
run: |
# Get version from package.json
VERSION=$(npm pkg get version | tr -d '"')
# Create annotated tag
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Changelog

> **Note**: As of December 2024, we have migrated to using GitHub Releases for our changelog.
> Please visit our [Releases page](https://github.com/ichoosetoaccept/awesome-windsurf/releases) for the latest changes.
> This file is kept for historical purposes only.
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
and this project adheres to [Calendar Versioning](https://calver.org/) (YYYY.MM.PATCH).

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

Expand Down
32 changes: 12 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,33 +85,25 @@ Every contribution makes Windsurf better for everyone. Don't hesitate to:
- You don't need to edit the CHANGELOG.md file manually
- For releases, add the 'release' label to your PR to create a version tag

## Releases and Versioning
## Release Process

We use Calendar Versioning (CalVer) with the format `YYYY.MM.PATCH`. Releases are managed entirely through GitHub Actions to ensure consistency:
We use GitHub Releases to document changes to this repository. Each release follows the Calendar Versioning format (YYYY.MM.PATCH).

### Automated Releases
### Pull Request Labels

A GitHub Action monitors changes and automatically proposes releases when:
To help organize our releases, we use a simple labeling system:

- More than 5 files have changed since last release, or
- More than 10 commits have been made since last release
- `content`: For documentation, guides, and content changes
- `meta`: For repository maintenance and workflow changes

The Action will:
### Creating a Release

1. Calculate the next version number
2. Update package.json
3. Generate the changelog
4. Create a PR with all changes
Releases are automatically generated based on merged pull requests and their labels. The process is:

### Manual Releases

To manually trigger a release:

1. Create a new PR
2. Use "release:" in the PR title (e.g., "release: add new feature X")
3. The same GitHub Action will handle version bumping and changelog updates

All releases go through PRs and the merge queue, ensuring proper review and consistency.
1. PRs are labeled appropriately during review
2. When ready for a release, we create a new GitHub Release
3. Release notes are automatically generated based on PR labels
4. The release version follows YYYY.MM.PATCH format

## Contributing Prompts

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
"private": false,
"devDependencies": {
"@commitlint/cli": "^19.6.0",
"auto-changelog": "^2.5.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.11",
"markdownlint-cli2": "^0.16.0"
},
"scripts": {
"postinstall": "husky",
"version": "auto-changelog -p && git add CHANGELOG.md"
"postinstall": "husky"
},
"lint-staged": {
"*.md": "markdownlint-cli2"
Expand Down
1 change: 1 addition & 0 deletions test-files/auto1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test file for automatic release testing - file 1
1 change: 1 addition & 0 deletions test-files/auto2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test file for automatic release testing - file 2
1 change: 1 addition & 0 deletions test-files/auto3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test file for automatic release testing - file 3
1 change: 1 addition & 0 deletions test-files/auto4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test file for automatic release testing - file 4
1 change: 1 addition & 0 deletions test-files/auto5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test file for automatic release testing - file 5
1 change: 1 addition & 0 deletions test-files/auto6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test file for automatic release testing - file 6
1 change: 0 additions & 1 deletion test-files/test1.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test10.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test2.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test3.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test4.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test5.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test6.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test7.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test8.txt

This file was deleted.

1 change: 0 additions & 1 deletion test-files/test9.txt

This file was deleted.

0 comments on commit a4c773e

Please sign in to comment.