Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
tags: ['v*.*.*']

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check tag matches package.json
run: |
version="v$(node -p 'require("./package.json").version')"
if [ "$version" != "$GITHUB_REF_NAME" ]; then
echo "Tag $GITHUB_REF_NAME does not match package.json ($version)" >&2
exit 1
fi
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" --verify-tag --generate-notes
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
message="chore(release): v%s"
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,15 @@ Questions about the SFU itself belong in

The code is [MIT](LICENSE) © Mathieu Chambaud. The Lumyx name, logo and the assets in
[`brand/`](brand) are not covered by the MIT license and may not be used to imply endorsement.

## Releasing

Versions follow [SemVer](https://semver.org/) and are cut from an up-to-date `main`:

```sh
npm version patch # or minor / major
```

This runs the CI checks, bumps `package.json`, commits `chore(release): vX.Y.Z`, tags `vX.Y.Z`
and pushes. The tag triggers the Release workflow, which publishes a GitHub release with
generated notes.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"lint": "turbo run lint",
"check-types": "turbo run check-types",
"test": "turbo run test",
"verify:ds": "turbo run verify:ds"
"verify:ds": "turbo run verify:ds",
"preversion": "test \"$(git branch --show-current)\" = main && git fetch -q origin main && test \"$(git rev-parse HEAD)\" = \"$(git rev-parse origin/main)\" && bun run lint && bun run check-types && bun run test && bun run verify:ds && bun run build",
"postversion": "git push --follow-tags"
},
"devDependencies": {
"turbo": "^2.10.12",
Expand Down
Loading