Skip to content

Commit 21595c3

Browse files
authored
Update docs and fix tag issue (#62)
* Update readme with release notes * Update readme * Fix cli to push tag in the repo
1 parent 8aad06d commit 21595c3

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ jobs:
5858
npm run build
5959
git add package.json package-lock.json dist/
6060
git commit -m "Packaging ${NEW_VERSION} with rebuilt /dist"
61-
git tag "v${NEW_VERSION}"
61+
git tag -a "v${NEW_VERSION}" -m "v${NEW_VERSION}"
62+
echo "NEW_VERSION=${NEW_VERSION}" >> "$GITHUB_ENV"
6263
6364
- name: Push to GitHub
64-
run: git push origin staging --follow-tags
65+
run: |
66+
git push origin staging
67+
git push origin "v${NEW_VERSION}"
6568
6669
- name: Publish to npm with provenance
6770
run: npm publish --provenance --access public

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,26 @@ Miscellaneous notes:
7070

7171
## Versioning and publishing to npm
7272

73-
> Releases can be automated via [Actions → "Release to npm"](https://github.com/OpenHistoricalMap/map-styles/actions/workflows/release.yml) — click **Run workflow**, choose `patch` / `minor` / `major`, and it builds `/dist`, commits, tags, and publishes with provenance via npm Trusted Publishers (no token required). Manual steps below remain as a fallback.
73+
Releases are **manually triggered** via the [Release to npm](https://github.com/OpenHistoricalMap/map-styles/actions/workflows/release.yml) GitHub Action. Authentication uses npm [Trusted Publishers](https://docs.npmjs.com/trusted-publishers) (OIDC) — no tokens required.
74+
75+
### How to release
76+
77+
1. Make sure your changes are merged into `staging` (PRs are validated automatically by [`validate.yml`](.github/workflows/validate.yml) on every push).
78+
2. Go to [Actions → "Release to npm" → Run workflow](https://github.com/OpenHistoricalMap/map-styles/actions/workflows/release.yml).
79+
3. Pick the branch `staging` and the bump type (`patch` / `minor` / `major`), then click **Run workflow**.
80+
4. The workflow rebuilds `/dist`, creates a single commit `Packaging X.Y.Z with rebuilt /dist`, tags it `vX.Y.Z`, pushes to `staging`, and publishes to npm with verified provenance.
81+
5. Update the OHM properties that depend on `map-styles`. For `ohm-website`, [Dependabot](https://docs.github.com/en/code-security/dependabot) runs daily and will automatically open a PR bumping the `yarn.lock` within ~24 hours of the publish — just review and merge it. The manual fallback steps are documented in the [ohm-website](#ohm-website) section below.
82+
83+
### Why manual?
84+
85+
Manual triggering lets us:
86+
- Batch multiple PRs into a single release (no version churn).
87+
- Choose `patch` / `minor` / `major` per release.
88+
- Avoid publishing on irrelevant changes (README edits, refactors, etc.).
89+
90+
### Manual fallback (without the workflow)
91+
92+
If the GitHub Action is unavailable, the release can be done locally:
7493

7594
1. increment the version in `package.json`, e.g., `0.9.7`
7695
1. commit your style changes, including `/dist/*` & `package.json`, push to GitHub, and [create a corresponding release](https://github.com/OpenHistoricalMap/map-styles/releases/new), e.g., `v0.9.7`

0 commit comments

Comments
 (0)