mirror of
https://github.com/calvinwyoung/obsidian-backlink-settings.git
synced 2026-07-22 05:45:37 +00:00
Update commands for publishing new releases (#8)
This commit is contained in:
parent
098329a73e
commit
789640b818
3 changed files with 33 additions and 5 deletions
25
Makefile
25
Makefile
|
|
@ -17,3 +17,28 @@ check:
|
|||
.PHONY: fix
|
||||
fix:
|
||||
pnpm run fix
|
||||
|
||||
# Bump the version, update manifest/versions files, and push a release branch.
|
||||
# Usage: make bump-version TYPE=patch|minor|major
|
||||
.PHONY: bump-version
|
||||
bump-version:
|
||||
ifndef TYPE
|
||||
$(error TYPE is required. Usage: make bump-version TYPE=patch|minor|major)
|
||||
endif
|
||||
pnpm version $(TYPE) --no-git-tag-version
|
||||
$(eval VERSION := $(shell node -p "require('./package.json').version"))
|
||||
npm_package_version=$(VERSION) node version-bump.mjs
|
||||
git checkout -b release/$(VERSION)
|
||||
git add package.json manifest.json versions.json
|
||||
git commit -m "$(VERSION)"
|
||||
git push -u origin release/$(VERSION)
|
||||
|
||||
# Tag the current version on main and push it to trigger the release workflow.
|
||||
# Run this after the bump-version PR has been merged.
|
||||
.PHONY: release-tag
|
||||
release-tag:
|
||||
git checkout main
|
||||
git pull origin main
|
||||
$(eval VERSION := $(shell node -p "require('./package.json').version"))
|
||||
git tag $(VERSION)
|
||||
git push origin $(VERSION)
|
||||
|
|
|
|||
12
README.md
12
README.md
|
|
@ -41,9 +41,13 @@ repository](https://obsidian.md/plugins?id=backlink-settings).
|
|||
|
||||
### Publishing
|
||||
|
||||
1. `pnpm version <major|minor|patch>` — bumps `version` in package.json, updates manifest.json and versions.json, and creates a git commit + tag
|
||||
2. `git push origin main --tags` — pushes the commit and tag
|
||||
3. GitHub Actions builds the plugin and creates a **draft** release with `main.js` and `manifest.json` attached
|
||||
4. Go to [GitHub Releases](https://github.com/calvinwyoung/obsidian-backlink-settings/releases) and publish the draft
|
||||
1. `make bump-version TYPE=<patch|minor|major>`: bumps version, creates a release branch,
|
||||
and pushes it
|
||||
2. Open a PR on GitHub, review, and merge
|
||||
3. `make release-tag`: pulls main, tags the merge commit, and pushes the tag
|
||||
4. GitHub Actions builds the plugin and creates a **draft** release
|
||||
5. Go to [GitHub
|
||||
Releases](https://github.com/calvinwyoung/obsidian-backlink-settings/releases) and
|
||||
publish the draft
|
||||
|
||||
> **Note:** `.npmrc` sets `tag-version-prefix=""` so tags are bare versions like `1.0.0` (no `v` prefix), which is what the GitHub Actions workflow expects.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
"scripts": {
|
||||
"dev": "node esbuild.config.mjs",
|
||||
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
|
||||
"version": "node version-bump.mjs && git add manifest.json versions.json",
|
||||
"check": "biome check .",
|
||||
"fix": "biome check --write .",
|
||||
"test": "vitest run"
|
||||
|
|
|
|||
Loading…
Reference in a new issue