Skip to content

Commit 3f75d62

Browse files
authored
Bump version to 1.6.0 (#119)
* Bump version to 1.6.0 * update changelog * Update CI to match other libraries
1 parent 2d7e1e6 commit 3f75d62

File tree

8 files changed

+147
-36
lines changed

8 files changed

+147
-36
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Create bump version PR
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Version to change to.
8+
required: true
9+
type: string
10+
11+
jobs:
12+
bump-version-pr:
13+
name: Bump version PR
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
shell: bash
18+
steps:
19+
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
ref: main
24+
25+
- name: Use Node.js from nvmrc
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version-file: '.nvmrc'
29+
30+
- name: Bump version
31+
run: |
32+
npm version --commit-hooks false --git-tag-version false ${{ inputs.version }}
33+
34+
- name: Create Pull Request
35+
uses: peter-evans/create-pull-request@v6
36+
with:
37+
commit-message: Bump version to ${{ inputs.version }}
38+
branch: bump-version-to-${{ inputs.version }}
39+
title: Bump version to ${{ inputs.version }}

.github/workflows/publish.yml

Lines changed: 81 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,98 @@
11
name: publish
22

33
on:
4-
workflow_dispatch:
54
push:
6-
tags:
7-
- v*
5+
branches: [main]
6+
workflow_dispatch:
87

98
jobs:
10-
publish:
11-
name: Publish
9+
release-check:
10+
name: Check if version changed
1211
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
shell: bash
1315
steps:
14-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
ref: main
20+
21+
- name: Use Node.js from nvmrc
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version-file: '.nvmrc'
25+
26+
- name: Check if version has been updated
27+
id: check
28+
uses: EndBug/version-check@v2
29+
30+
outputs:
31+
publish: ${{ steps.check.outputs.changed }}
32+
33+
release:
34+
name: Release
35+
needs: release-check
36+
if: ${{ needs.release-check.outputs.publish == 'true' }}
37+
runs-on: ubuntu-latest
38+
defaults:
39+
run:
40+
shell: bash
41+
steps:
42+
43+
- uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 0
46+
ref: main
1547

16-
- name: Use Node.js x64
17-
uses: actions/setup-node@v2
48+
- name: Use Node.js from nvmrc
49+
uses: actions/setup-node@v4
1850
with:
19-
node-version: 16
20-
architecture: x64
21-
registry-url: "https://registry.npmjs.org"
51+
node-version-file: '.nvmrc'
52+
registry-url: 'https://registry.npmjs.org'
2253

23-
- name: Install build dependencies
54+
- name: Get version
55+
id: package-version
56+
uses: martinbeentjes/[email protected]
57+
58+
- name: Install & build
2459
run: |
2560
npm ci
61+
npm run build-dist
2662
27-
- name: Publish
63+
- name: Publish NPM package
2864
run: |
29-
npm publish --access=public --non-interactive
65+
npm publish --access=public
3066
env:
3167
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }}
68+
69+
- name: Tag commit and push
70+
id: tag_version
71+
uses: mathieudutour/[email protected]
72+
with:
73+
github_token: ${{ secrets.GITHUB_TOKEN }}
74+
custom_tag: ${{ steps.package-version.outputs.current-version }}
75+
76+
- name: Create GitHub Release
77+
id: create_regular_release
78+
uses: ncipollo/release-action@v1
79+
env:
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
with:
82+
tag: ${{ steps.tag_version.outputs.new_tag }}
83+
name: ${{ steps.tag_version.outputs.new_tag }}
84+
body: 'Changes since last release:\n ${{ steps.tag_version.outputs.changelog }}'
85+
allowUpdates: true
86+
draft: false
87+
prerelease: false
88+
89+
- name: Build the Docs
90+
run: |
91+
npm run docs
92+
93+
- name: Publish the docs
94+
uses: peaceiris/actions-gh-pages@v4
95+
with:
96+
github_token: ${{ secrets.GITHUB_TOKEN }}
97+
publish_dir: docs
98+
commit_message: 'deploy docs: ${{ steps.tag_version.outputs.new_tag }}'

.github/workflows/test.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ jobs:
1010
name: test
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
- name: Use Node.js x64
16-
uses: actions/setup-node@v2
16+
uses: actions/setup-node@v4
1717
with:
18-
node-version: 16
19-
architecture: x64
20-
registry-url: "https://registry.npmjs.org"
18+
node-version-file: '.nvmrc'
2119

2220
- name: Install build dependencies
2321
run: |
@@ -27,3 +25,7 @@ jobs:
2725
- name: Test
2826
run: |
2927
npm test
28+
29+
- name: Docs
30+
run: |
31+
npm run docs

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.10

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44

55
### Bug fixes 🐛
66

7+
## 1.6.0
8+
9+
### Features / Improvements 🚀
10+
11+
- Make the clear button type="button" by @daiwai in https://github.com/maplibre/maplibre-gl-geocoder/pull/116
12+
- Modernize the codebase using typescript typings, rollup, typedoc and jest. by @HarelM in https://github.com/maplibre/maplibre-gl-geocoder/pull/118
13+
14+
### Bug fixes 🐛
15+
16+
- Fixed issues with `events` dependency https://github.com/maplibre/maplibre-gl-geocoder/issues/104
17+
- Fixed links to "Carmen GeoJSON" format reference https://github.com/maplibre/maplibre-gl-geocoder/issues/110
18+
- Fixed a lot of documentation issues by linking the docs to the code itself https://github.com/maplibre/maplibre-gl-geocoder/pull/118
19+
720
## 1.5.0
821

922
### Features / Improvements 🚀

CONTRIBUTING.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,8 @@ Lastly, run the test command from the console:
1616

1717
Follow this deploy process after all changes for the release are merged into main. You will copy and paste this checklist in the comment of the release pull request.
1818

19-
```
19+
2020
## Release checklist
2121

22-
1. Create a branch off `main` and a pull request with the following changes. Copy this checklist in the comment of the pull request.
23-
- [ ] Update the [CHANGELOG.md](https://github.com/thaddmt/maplibre-gl-geocoder/blob/main/CHANGELOG.md) by comparing the last release and what is on `main`. In the changelog, replace the `main` heading with the to-be-released stable version.
24-
- [ ] Update the version number in `package.json` and `package-lock.json`.
25-
3. Request a PR review and then merge it into `main`.
26-
4. Tag the release and start the build.
27-
- [ ] Make sure you've pulled in all changes to `main` locally.
28-
- [ ] Build the release with `npm run prepublish && npm run docs`
29-
- [ ] Commit and push with commit message `vX.X.X`
30-
- [ ] Create the git tag for the release with `git tag -a vX.X.X -m 'vX.X.X'`
31-
- [ ] Push the tags with `git push --tags`
32-
- [ ] Run `npm publish`
33-
34-
```
22+
Using github actions, create a bump version PR, update the changelog in that PR.
23+
Merge it to main and the rest will be done using Github actions.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@maplibre/maplibre-gl-geocoder",
3-
"version": "1.5.0",
3+
"version": "1.6.0",
44
"description": "A geocoder control for Maplibre GL JS",
55
"main": "dist/maplibre-gl-geocoder.js",
66
"module": "dist/maplibre-gl-geocoder.mjs",

0 commit comments

Comments
 (0)