diff --git a/.github/workflows/release_please.yml b/.github/workflows/release_please.yml new file mode 100644 index 00000000..e54baf4b --- /dev/null +++ b/.github/workflows/release_please.yml @@ -0,0 +1,22 @@ +on: + push: + branches: + - main + - release-please-test + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + # this is a built-in strategy in release-please, see "Action Inputs" + # for more options + release-type: simple diff --git a/.github/workflows/release_plz.yml b/.github/workflows/release_plz.yml deleted file mode 100644 index cc5bc4ff..00000000 --- a/.github/workflows/release_plz.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Release-plz - -permissions: - pull-requests: write - contents: write - -on: - push: - branches: - - main - -jobs: - release-plz: - name: Release-plz - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - name: Run release-plz - uses: MarcoIeni/release-plz-action@v0.5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..e18ee077 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.0.0" +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 53fa3803..9f407078 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,6 +30,8 @@ Check out the [Roadmap](https://docs.atomicdata.dev/roadmap.html) if you want to - [Criterion benchmarks](#criterion-benchmarks) - [Drill](#drill) - [Responsible disclosure / Coordinated Vulnerability Disclosure](#responsible-disclosure--coordinated-vulnerability-disclosure) +- [Automated releases and versioning](#automated-releases-and-versioning) +- [Commits](#commits) - [Releases, Versioning and Tagging](#releases-versioning-and-tagging) - [CI situation](#ci-situation) - [Publishing manually - doing the CI's work](#publishing-manually---doing-the-cis-work) @@ -196,6 +198,23 @@ If you encounter serious security risks, please refrain from posting these publi We could minimize the impact by first patching the issue, publishing the patch, and then (after 30 days) disclose the bug. So please first send an e-mail to joep@ontola.io describing the issue, and then we will work on fixing it as soon as possible. +## Automated releases and versioning + +We use `release-please` to automatically create version bumps and PRs. +The `.release-please-manifest.json` file contains the configuration for this (see [docs](https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md)). + +## Commits + +Use [ConventionalCommits](https://www.conventionalcommits.org/) for commit messages. + +- `fix: ...` for bugfixes +- `feat: ...` for new features +- `chore: ...` for changes that don't affect the code (e.g. updating dependencies) + +Be sure to link to issues using `#123`. + +The Changelog is automatically updated! + ## Releases, Versioning and Tagging 1. Commit changes diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..e039b69c --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,62 @@ +{ + "packages": { + ".": { + "changelog-path": "CHANGELOG.md", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "prerelease": false + }, + "browser/lib": { + "release-type": "node", + "component": "lib-js" + }, + "browser/react": { + "release-type": "node", + "component": "react" + }, + "browser/svelte": { + "release-type": "node", + "component": "svelte" + }, + "browser/cli": { + "release-type": "node", + "component": "cli-js" + }, + "server": { + "release-type": "rust", + "component": "server" + }, + "lib": { + "release-type": "rust", + "component": "lib-rs" + }, + "cli": { + "release-type": "rust", + "component": "cli-rs" + } + }, + "plugins": [ + { + "type": "cargo-workspace", + "merge": false + }, + { + "type": "node-workspace" + }, + { + "type": "linked-versions", + "groupName": "atomic-linked-versions", + "components": [ + "lib-js", + "react", + "svelte", + "cli-js", + "server", + "lib-rs", + "cli-rs" + ] + } + ], + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}