Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add a MapboxFullscreenControl component #177

Merged
merged 5 commits into from
Jan 2, 2025
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
21 changes: 21 additions & 0 deletions .github/workflows/export-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: export-size

on:
pull_request:
branches:
- master
- develop

jobs:
export-size:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: titouanmathis/export-size-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: npm run build
paths: dist
node-version: 22
78 changes: 78 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: publish-and-release

on:
push:
tags:
- '*.*.*'

jobs:
publish-and-release:
runs-on: macos-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/

- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
id: npm-cache
with:
path: |
${{ steps.npm-cache-dir.outputs.dir }}
**/node_modules
.eslintcache
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-

- run: npm install --no-audit --no-fund

- run: npm run build

- name: Test
run: npm run test -- -- --retry=3 --coverage.enabled

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/coverage
flags: unittests
fail_ci_if_error: false
verbose: true

- run: |
NPM_TAG='latest'
IS_PRERELEASE=false

if [[ $GITHUB_REF_NAME =~ 'alpha' || $GITHUB_REF_NAME =~ 'beta' || $GITHUB_REF_NAME =~ 'rc' ]]; then
NPM_TAG='next'
IS_PRERELEASE=true
fi

echo "NPM_TAG=$NPM_TAG" >> $GITHUB_ENV
echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_ENV

- uses: JS-DevTools/npm-publish@v3
with:
provenance: true
package: dist/
tag: ${{ env.NPM_TAG }}
token: ${{ secrets.NPM_TOKEN }}

- uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: v${{ github.ref_name }}
body: Please refer to [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/CHANGELOG.md) for details.
draft: false
prerelease: ${{ env.IS_PRERELEASE }}
63 changes: 0 additions & 63 deletions .github/workflows/release.yml

This file was deleted.

72 changes: 41 additions & 31 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,57 @@
name: Tests
name: tests

on:
push:
branches:
- feature/vue-3
- master
- develop
pull_request:

jobs:

Build:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20
cache: npm
- name: Install modules
run: npm install
- name: Build the package
run: npm run build
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm install
- name: Build
run: npm run build

Code-Quality:
code-quality:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20
cache: npm
- name: Install modules
run: npm install
- name: Run code quality tests
run: npm run lint -- --format=compact
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm install
- name: Run code quality tests
run: npm run lint

Export-Size:
runs-on: ubuntu-latest
unit:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
fetch-depth: '0'
- uses: titouanmathis/export-size-action@main
node-version: 22
cache: npm
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test -- -- --retry=3 --coverage.enabled
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: npm run build
paths: dist
files: ./packages/coverage/clover.xml
flags: unittests
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ yarn-error.log*
/packages/docs/.vitepress/cache
/packages/demo/.nuxt/
/packages/demo/.output/
/packages/coverage/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format

## [Unreleased]

### Added

- Add a `MapboxFullscreenControl` component ([#177](https://github.com/studiometa/vue-mapbox-gl/pull/177), [36fff83](https://github.com/studiometa/vue-mapbox-gl/commit/36fff83))

## [v2.5.0](https://github.com/studiometa/vue-mapbox-gl/compare/2.4.0...2.5.0) (2024-03-05)

### Added
Expand Down
Loading