Skip to content

Commit

Permalink
Bump version to 1.6.0 (#119)
Browse files Browse the repository at this point in the history
* Bump version to 1.6.0

* update changelog

* Update CI to match other libraries
  • Loading branch information
HarelM authored Aug 20, 2024
1 parent 2d7e1e6 commit 3f75d62
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 36 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/create-bumb-version-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Create bump version PR

on:
workflow_dispatch:
inputs:
version:
description: Version to change to.
required: true
type: string

jobs:
bump-version-pr:
name: Bump version PR
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Use Node.js from nvmrc
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Bump version
run: |
npm version --commit-hooks false --git-tag-version false ${{ inputs.version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Bump version to ${{ inputs.version }}
branch: bump-version-to-${{ inputs.version }}
title: Bump version to ${{ inputs.version }}
95 changes: 81 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,98 @@
name: publish

on:
workflow_dispatch:
push:
tags:
- v*
branches: [main]
workflow_dispatch:

jobs:
publish:
name: Publish
release-check:
name: Check if version changed
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Use Node.js from nvmrc
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2

outputs:
publish: ${{ steps.check.outputs.changed }}

release:
name: Release
needs: release-check
if: ${{ needs.release-check.outputs.publish == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Use Node.js x64
uses: actions/setup-node@v2
- name: Use Node.js from nvmrc
uses: actions/setup-node@v4
with:
node-version: 16
architecture: x64
registry-url: "https://registry.npmjs.org"
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Install build dependencies
- name: Get version
id: package-version
uses: martinbeentjes/[email protected]

- name: Install & build
run: |
npm ci
npm run build-dist
- name: Publish
- name: Publish NPM package
run: |
npm publish --access=public --non-interactive
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }}

- name: Tag commit and push
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.package-version.outputs.current-version }}

- name: Create GitHub Release
id: create_regular_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
body: 'Changes since last release:\n ${{ steps.tag_version.outputs.changelog }}'
allowUpdates: true
draft: false
prerelease: false

- name: Build the Docs
run: |
npm run docs
- name: Publish the docs
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
commit_message: 'deploy docs: ${{ steps.tag_version.outputs.new_tag }}'
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ jobs:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

- name: Install build dependencies
run: |
Expand All @@ -27,3 +25,7 @@ jobs:
- name: Test
run: |
npm test
- name: Docs
run: |
npm run docs
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.10
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

### Bug fixes 🐛

## 1.6.0

### Features / Improvements 🚀

- Make the clear button type="button" by @daiwai in https://github.com/maplibre/maplibre-gl-geocoder/pull/116
- Modernize the codebase using typescript typings, rollup, typedoc and jest. by @HarelM in https://github.com/maplibre/maplibre-gl-geocoder/pull/118

### Bug fixes 🐛

- Fixed issues with `events` dependency https://github.com/maplibre/maplibre-gl-geocoder/issues/104
- Fixed links to "Carmen GeoJSON" format reference https://github.com/maplibre/maplibre-gl-geocoder/issues/110
- Fixed a lot of documentation issues by linking the docs to the code itself https://github.com/maplibre/maplibre-gl-geocoder/pull/118

## 1.5.0

### Features / Improvements 🚀
Expand Down
17 changes: 3 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,8 @@ Lastly, run the test command from the console:

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.

```

## Release checklist

1. Create a branch off `main` and a pull request with the following changes. Copy this checklist in the comment of the pull request.
- [ ] 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.
- [ ] Update the version number in `package.json` and `package-lock.json`.
3. Request a PR review and then merge it into `main`.
4. Tag the release and start the build.
- [ ] Make sure you've pulled in all changes to `main` locally.
- [ ] Build the release with `npm run prepublish && npm run docs`
- [ ] Commit and push with commit message `vX.X.X`
- [ ] Create the git tag for the release with `git tag -a vX.X.X -m 'vX.X.X'`
- [ ] Push the tags with `git push --tags`
- [ ] Run `npm publish`
```
Using github actions, create a bump version PR, update the changelog in that PR.
Merge it to main and the rest will be done using Github actions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@maplibre/maplibre-gl-geocoder",
"version": "1.5.0",
"version": "1.6.0",
"description": "A geocoder control for Maplibre GL JS",
"main": "dist/maplibre-gl-geocoder.js",
"module": "dist/maplibre-gl-geocoder.mjs",
Expand Down

0 comments on commit 3f75d62

Please sign in to comment.