@openhistoricalmap/map-styles 0.9.13 → 0.9.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +67 -0
- package/.github/workflows/validate.yml +25 -0
- package/README.md +2 -0
- package/dist/historical/historical.json +424 -152
- package/dist/japanese_scroll/japanese_scroll.json +86 -30
- package/dist/ohm.styles.js +1139 -411
- package/dist/railway/railway.json +542 -198
- package/dist/woodblock/woodblock.json +86 -30
- package/historical/historical.json +68 -68
- package/japanese_scroll/japanese_scroll.json +14 -14
- package/package.json +1 -1
- package/railway/railway.json +86 -86
- package/woodblock/woodblock.json +14 -14
- package/wkg/index.html +0 -18
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Release to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
bump:
|
|
7
|
+
description: 'Version bump'
|
|
8
|
+
type: choice
|
|
9
|
+
options:
|
|
10
|
+
- patch
|
|
11
|
+
- minor
|
|
12
|
+
- major
|
|
13
|
+
default: patch
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: release
|
|
17
|
+
cancel-in-progress: false
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
release:
|
|
21
|
+
if: github.ref_name == 'staging'
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
permissions:
|
|
24
|
+
contents: write
|
|
25
|
+
id-token: write
|
|
26
|
+
steps:
|
|
27
|
+
- name: Verify staging branch
|
|
28
|
+
run: |
|
|
29
|
+
if [ "${{ github.ref_name }}" != "staging" ]; then
|
|
30
|
+
echo "::error::Releases can only be triggered from the 'staging' branch (got: ${{ github.ref_name }})"
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
ref: staging
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
|
|
39
|
+
- uses: actions/setup-node@v4
|
|
40
|
+
with:
|
|
41
|
+
node-version-file: '.nvmrc'
|
|
42
|
+
registry-url: 'https://registry.npmjs.org'
|
|
43
|
+
|
|
44
|
+
- name: Upgrade npm (required for Trusted Publishers)
|
|
45
|
+
run: npm install -g npm@latest
|
|
46
|
+
|
|
47
|
+
- run: npm ci
|
|
48
|
+
|
|
49
|
+
- name: Configure git identity
|
|
50
|
+
run: |
|
|
51
|
+
git config user.name "github-actions[bot]"
|
|
52
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
53
|
+
|
|
54
|
+
- name: Bump version, rebuild /dist, commit and tag
|
|
55
|
+
run: |
|
|
56
|
+
NEW_VERSION=$(npm version ${{ inputs.bump }} --no-git-tag-version)
|
|
57
|
+
NEW_VERSION="${NEW_VERSION#v}"
|
|
58
|
+
npm run build
|
|
59
|
+
git add package.json package-lock.json dist/
|
|
60
|
+
git commit -m "Packaging ${NEW_VERSION} with rebuilt /dist"
|
|
61
|
+
git tag "v${NEW_VERSION}"
|
|
62
|
+
|
|
63
|
+
- name: Push to GitHub
|
|
64
|
+
run: git push origin staging --follow-tags
|
|
65
|
+
|
|
66
|
+
- name: Publish to npm with provenance
|
|
67
|
+
run: npm publish --provenance --access public
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Validate build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches-ignore:
|
|
6
|
+
- staging
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
validate:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version-file: '.nvmrc'
|
|
17
|
+
registry-url: 'https://registry.npmjs.org'
|
|
18
|
+
|
|
19
|
+
- run: npm ci
|
|
20
|
+
|
|
21
|
+
- name: Build /dist
|
|
22
|
+
run: npm run build
|
|
23
|
+
|
|
24
|
+
- name: Validate npm package (dry-run)
|
|
25
|
+
run: npm publish --dry-run
|
package/README.md
CHANGED
|
@@ -70,6 +70,8 @@ Miscellaneous notes:
|
|
|
70
70
|
|
|
71
71
|
## Versioning and publishing to npm
|
|
72
72
|
|
|
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.
|
|
74
|
+
|
|
73
75
|
1. increment the version in `package.json`, e.g., `0.9.7`
|
|
74
76
|
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`
|
|
75
77
|
1. publish to npm using `npm publish`
|