Skip to content

Commit 16f5fd0

Browse files
committed
feat: setup Release Please automation
1 parent 242bfac commit 16f5fd0

File tree

5 files changed

+121
-0
lines changed

5 files changed

+121
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
issues: write
9+
pull-requests: write
10+
11+
name: release-please
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: googleapis/release-please-action@v4
18+
id: release
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
# Optional: Build and attach binaries to the release
23+
- uses: actions/checkout@v4
24+
if: ${{ steps.release.outputs.release_created }}
25+
26+
- uses: actions/setup-go@v4
27+
with:
28+
go-version-file: 'go.mod'
29+
if: ${{ steps.release.outputs.release_created }}
30+
31+
- name: Build binaries
32+
if: ${{ steps.release.outputs.release_created }}
33+
run: |
34+
# Build for multiple platforms
35+
GOOS=linux GOARCH=amd64 go build -o notion-md-linux-amd64 ./cmd/notion-md
36+
GOOS=linux GOARCH=arm64 go build -o notion-md-linux-arm64 ./cmd/notion-md
37+
GOOS=darwin GOARCH=amd64 go build -o notion-md-darwin-amd64 ./cmd/notion-md
38+
GOOS=darwin GOARCH=arm64 go build -o notion-md-darwin-arm64 ./cmd/notion-md
39+
GOOS=windows GOARCH=amd64 go build -o notion-md-windows-amd64.exe ./cmd/notion-md
40+
41+
- name: Upload Release Artifacts
42+
if: ${{ steps.release.outputs.release_created }}
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
run: |
46+
gh release upload ${{ steps.release.outputs.tag_name }} \
47+
notion-md-linux-amd64 \
48+
notion-md-linux-arm64 \
49+
notion-md-darwin-amd64 \
50+
notion-md-darwin-arm64 \
51+
notion-md-windows-amd64.exe

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0"
3+
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,45 @@
22

33
Thank you for your interest in contributing to md2notion! This document provides guidelines and instructions for contributing.
44

5+
## Commit Message Guidelines
6+
7+
This project uses [Conventional Commits](https://www.conventionalcommits.org/) to automate releases and changelog generation. Please format your commit messages as follows:
8+
9+
```
10+
<type>[optional scope]: <description>
11+
12+
[optional body]
13+
14+
[optional footer(s)]
15+
```
16+
17+
### Commit Types
18+
19+
- `feat:` - A new feature (correlates to a SemVer minor version bump)
20+
- `fix:` - A bug fix (correlates to a SemVer patch version bump)
21+
- `docs:` - Documentation only changes
22+
- `style:` - Changes that do not affect the meaning of the code (white-space, formatting, etc.)
23+
- `refactor:` - A code change that neither fixes a bug nor adds a feature
24+
- `perf:` - A code change that improves performance
25+
- `test:` - Adding missing tests or correcting existing tests
26+
- `build:` - Changes that affect the build system or external dependencies
27+
- `ci:` - Changes to our CI configuration files and scripts
28+
- `chore:` - Other changes that don't modify src or test files
29+
- `revert:` - Reverts a previous commit
30+
31+
### Breaking Changes
32+
33+
For breaking changes, add a `!` after the type/scope: `feat!:` or add `BREAKING CHANGE:` in the footer.
34+
35+
### Examples
36+
37+
```
38+
feat: add support for nested lists in markdown conversion
39+
fix: resolve issue with image URL handling
40+
docs: update README with new installation instructions
41+
feat!: change API response format for better consistency
42+
```
43+
544
## Development Setup
645

746
### Prerequisites

release-please-config.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"release-type": "go",
3+
"bump-minor-pre-major": true,
4+
"bump-patch-for-minor-pre-major": true,
5+
"changelog-sections": [
6+
{"type": "feat", "section": "Features"},
7+
{"type": "fix", "section": "Bug Fixes"},
8+
{"type": "perf", "section": "Performance Improvements"},
9+
{"type": "revert", "section": "Reverts"},
10+
{"type": "docs", "section": "Documentation"},
11+
{"type": "style", "section": "Styles", "hidden": true},
12+
{"type": "refactor", "section": "Code Refactoring"},
13+
{"type": "test", "section": "Tests", "hidden": true},
14+
{"type": "build", "section": "Build System", "hidden": true},
15+
{"type": "ci", "section": "Continuous Integration", "hidden": true}
16+
],
17+
"packages": {
18+
".": {
19+
"package-name": "markdown-to-notionapi"
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)