Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
db264ae
ci: automatic changelog generation
Jan 2, 2026
47556ee
add PR label check workflow
Jan 2, 2026
1ed9dd7
remove change
Jan 2, 2026
2c65678
fix: use yq instead of js-yaml for label extraction
Jan 5, 2026
73a701b
improve readability of label extraction pipeline
Jan 5, 2026
d08843b
fix bash syntax - remove inline comments after line continuations
Jan 5, 2026
ae88a40
Remove lib/ build artifacts from tracking and add to .gitignore
Apr 1, 2026
db49218
Add prepare script for npm publish and skip label check for Dependabot
Apr 1, 2026
4cb37f7
Revert "Add prepare script for npm publish and skip label check for D…
Apr 1, 2026
98733ed
Revert "Remove lib/ build artifacts from tracking and add to .gitignore"
Apr 1, 2026
2fbd181
Skip PR label check for Dependabot PRs
Apr 1, 2026
62d6c81
Merge remote-tracking branch 'origin/master' into thomas/changelog
Apr 13, 2026
828869d
Strip lib/ build artifacts made redundant by #158
Apr 13, 2026
a7e7c1b
fix: upgrade release-it to v15+ for autoGenerate support and include …
Apr 13, 2026
83c500e
docs: clarify that PR labels control release note categories, not ver…
Apr 13, 2026
0761bf7
Merge remote-tracking branch 'origin/master' into thomas/changelog
Apr 19, 2026
69f9ef1
fix: address PR #156 review findings
May 12, 2026
bc6d812
docs: document the actual gh-based release flow in CONTRIBUTING
May 12, 2026
41c1ba1
docs: correct release flow — yarn release is the entry point, not gh
May 12, 2026
771f8d8
docs: document major/minor/patch bump decision in release flow
May 12, 2026
4492756
docs: cut release section down to the essentials
May 12, 2026
d6cbb11
docs: restore NPM_TOKEN + maintainer-permission note
May 12, 2026
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
23 changes: 23 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
changelog:
exclude:
labels:
- ignore-for-release
- dependencies
authors:
- dependabot[bot]
categories:
- title: Breaking Changes 🛠
labels:
- breaking
- title: New Features 🎉
labels:
- enhancement
- title: Bug Fixes 🐛
labels:
- bug
- title: Documentation 📚
labels:
- documentation
- title: Other Changes
labels:
- "*"
33 changes: 33 additions & 0 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PR Labels

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
check-labels:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4

- name: Extract valid labels from release.yml
id: extract-labels
run: |
# Extract category labels and exclude labels so PRs labeled with
# ignore-for-release or dependencies also pass the check
category_labels=$(yq eval '.changelog.categories[].labels[]' .github/release.yml)
exclude_labels=$(yq eval '.changelog.exclude.labels[]' .github/release.yml 2>/dev/null)
labels=$(printf '%s\n%s' "$category_labels" "$exclude_labels")
labels=$(echo "$labels" | grep -v '^\*$') # Remove wildcard entries (*)
labels=$(echo "$labels" | grep -v '^$') # Remove empty lines
labels=$(echo "$labels" | tr '\n' ',') # Convert newlines to commas
labels=$(echo "$labels" | sed 's/,$//') # Remove trailing comma
echo "labels=$labels" >> $GITHUB_OUTPUT
echo "Extracted labels: $labels"

- uses: mheap/github-action-required-labels@0ac283b4e65c1fb28ce6079dea5546ceca98ccbe # v5
with:
mode: minimum
count: 1
labels: ${{ steps.extract-labels.outputs.labels }}
Comment thread
thomasttvo marked this conversation as resolved.
Comment thread
claude[bot] marked this conversation as resolved.
21 changes: 15 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,25 @@ You don't need to run build commands locally unless testing the built output.

### Publishing to npm

We use [release-it](https://github.com/release-it/release-it) to create releases and [GitHub Actions](.github/workflows/release.yml) to build and publish to npm.
Run `yarn release`. Pick the bump:

To publish new versions:
- **major** — any merged PR labeled `breaking`
- **minor** — any merged PR labeled `enhancement` (and no `breaking`)
- **patch** — anything else

1. Run `yarn release` locally (creates git tag and GitHub release)
2. GitHub Actions automatically builds and publishes to npm
That's it. release-it bumps `package.json`, tags, pushes, and creates a GitHub Release. The release-published event triggers [`.github/workflows/release.yml`](.github/workflows/release.yml), which publishes to npm.

Only maintainers with permission to create releases can publish. The repository must have an `NPM_TOKEN` secret configured (Settings → Secrets and variables → Actions) for CI to publish to npm.
Pre-releases: `yarn release --preRelease=beta`. The publish workflow skips them — to ship a beta, run `npm publish --tag beta --access public` manually.

> **Note:** GitHub pre-releases (e.g. `v3.0.0-beta.1`) intentionally skip the npm publish step to prevent beta versions from being tagged as `latest`. The CI job will show as "Skipped" — this is expected. To publish a pre-release manually, build locally and run `npm publish --tag beta --access public`.
Only maintainers with permission to create releases can publish. Requires `NPM_TOKEN` configured in repo secrets (Settings → Secrets and variables → Actions).

### Changelog and Release Notes

Auto-generated by GitHub from merged PR labels per [`.github/release.yml`](.github/release.yml). Label your PRs:

- `breaking` · `enhancement` · `bug` · `documentation`

PRs labeled `ignore-for-release` or `dependencies` are excluded from release notes entirely. The [`.github/workflows/pr-labels.yml`](.github/workflows/pr-labels.yml) workflow enforces that every PR carries at least one of these labels.

### Scripts

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Check out this [Expo Snack](https://snack.expo.dev/@thomasttvo/eaf257)

![](https://thumbs.gfycat.com/NaughtyBlackandwhiteBudgie-size_restricted.gif)

## Changelog

See [GitHub Releases](https://github.com/openspacelabs/react-native-zoomable-view/releases) for version history and release notes.

## Getting started

- [Installation](#installation)
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"!**/__mocks__"
],
"scripts": {
"prepare": "bob build",
"prepublishOnly": "yarn build",
"test": "jest",
"typescript": "tsc --noEmit",
Expand Down Expand Up @@ -67,7 +68,6 @@
"devDependencies": {
"@commitlint/config-conventional": "^11.0.0",
"@react-native/eslint-config": "^0.73.0",
"@release-it/conventional-changelog": "^2.0.0",
"@types/lodash": "^4.17.7",
"@types/react": "^16.9.19",
"@types/react-native": "^0.65.4",
Expand All @@ -84,7 +84,7 @@
"react": "17.0.2",
"react-native": "0.79.7",
"react-native-builder-bob": "^0.30.0",
"release-it": "^14.2.2",
"release-it": "^15.0.0",
Comment thread
claude[bot] marked this conversation as resolved.
"typescript": "^4.9.5"
},
"peerDependencies": {
Expand Down Expand Up @@ -117,12 +117,8 @@
"publish": false
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
}
"release": true,
"autoGenerate": true
}
Comment thread
thomasttvo marked this conversation as resolved.
},
"eslintConfig": {
Comment thread
claude[bot] marked this conversation as resolved.
Expand Down
Loading
Loading