Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,15 @@ name: CI

on:
push:
branches: [main]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository ||
github.event.pull_request.user.login == 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm run test
- run: npm run build
ci:
uses: maptoolkit/.github/.github/workflows/npm-ci.yml@main
permissions:
contents: read
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: Deploy demo to GitHub Pages

on:
workflow_dispatch:
push:
tags:
- "v*"
workflow_call:

permissions:
id-token: write
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Docs

on:
workflow_dispatch:
workflow_call:
secrets:
DOCS_REPO_TOKEN:
required: true

jobs:
publish-docs:
uses: maptoolkit/.github/.github/workflows/publish-docs.yml@main
with:
docs-path: docs/content/third-party-libraries/maplibre/maplibre-logo-control.md
front-matter: |
title: "Add the Maptoolkit Logo to MapLibre GL JS"
linkTitle: "Logo Control"
description: "Show the Maptoolkit logo on your MapLibre GL JS map with the Maptoolkit Logo Control plugin: install, usage, and placement."
weight: 40
libraries: [maplibre]
tags: [maplibre, controls, attribution]
secrets:
DOCS_REPO_TOKEN: ${{ secrets.DOCS_REPO_TOKEN }}
50 changes: 21 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,27 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
runs-on: ubuntu-latest
uses: maptoolkit/.github/.github/workflows/npm-release.yml@main
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- name: Create release PR or publish to npm
uses: changesets/action@v1
with:
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push release tags and create GitHub releases
run: |
tags=$(git tag --points-at HEAD)
if [ -n "$tags" ]; then
git push origin --tags
for tag in $tags; do
gh release create "$tag" --title "$tag" --generate-notes
done
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy-pages:
needs: release
if: needs.release.outputs.published == 'true'
uses: ./.github/workflows/deploy-pages.yml
permissions:
id-token: write
pages: write
contents: read

publish-docs:
needs: release
if: needs.release.outputs.published == 'true'
uses: ./.github/workflows/publish-docs.yml
permissions:
contents: read
secrets:
DOCS_REPO_TOKEN: ${{ secrets.DOCS_REPO_TOKEN }}
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# maplibre-logo-control

[![License](https://img.shields.io/npm/l/@maptoolkit/maplibre-logo-control?style=plastic)](LICENSE)
[![Version](https://img.shields.io/npm/v/@maptoolkit/maplibre-logo-control?style=plastic)](https://www.npmjs.com/package/@maptoolkit/maplibre-logo-control)
[![Downloads](https://img.shields.io/npm/dm/@maptoolkit/maplibre-logo-control?style=plastic)](https://www.npmjs.com/package/@maptoolkit/maplibre-logo-control)
[![NPM](https://img.shields.io/npm/v/@maptoolkit/maplibre-style-control?style=for-the-badge&logo=npm&logoColor=white&labelColor=CB3837&color=555)](https://www.npmjs.com/package/@maptoolkit/maplibre-style-control)
[![License](https://img.shields.io/npm/l/@maptoolkit/maplibre-style-control?style=for-the-badge)](https://github.com/maptoolkit/maplibre-style-control/blob/main/LICENSE)
[![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/maptoolkit/maplibre-style-control)

A [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) control plugin that adds a maptoolkit logo link to the map.

Expand All @@ -14,6 +14,8 @@ A [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) control plugin tha
npm install @maptoolkit/maplibre-logo-control maplibre-gl
```

Built and tested against `maplibre-gl` v6.

## Usage

```js
Expand Down
Loading