Skip to content

Commit

Permalink
chore: standardize repos (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoehnelt authored Sep 17, 2021
1 parent 5bda1a0 commit 05e3e4c
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: npm i
- run: npm run build
- run: npm run lint
- run: npm test
- uses: codecov/codecov-action@v1
32 changes: 32 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Docs
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
npm i
npm run docs
- uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
user_name: 'googlemaps-bot'
user_email: 'googlemaps-bot@users.noreply.github.com'
commit_message: ${{ github.event.head_commit.message }}
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: "Release"
name: Release
on:
push:
branches:
- main
- next
concurrency: release
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -26,16 +26,19 @@ jobs:
- name: Test
run: |
npm i
npm run lint
npm test
- name: Release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
"@semantic-release/commit-analyzer"
"@semantic-release/release-notes-generator"
"@semantic-release/git
"@semantic-release/github
"@semantic-release/npm
@semantic-release/commit-analyzer
semantic-release-interval
@semantic-release/release-notes-generator
@semantic-release/git
@semantic-release/github
@semantic-release/npm
@googlemaps/semantic-release-config
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_WOMBAT_TOKEN }}
74 changes: 74 additions & 0 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"scripts": {
"format": "prettier *.json *.js --write && eslint src/* --fix",
"lint": "eslint src/*",
"prepare": "rollup -c",
"prepare": "rm -rf dist && rollup -c",
"test": "jest src/*",
"build": "rm -rf dist && rollup -c"
"docs": "typedoc src/index.ts"
},
"devDependencies": {
"@types/google.maps": "^3.45.6",
Expand All @@ -42,6 +42,7 @@
"rollup": "^2.56.3",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "^27.0.5",
"typedoc": "^0.22.3",
"typescript": "^4.4.3"
},
"publishConfig": {
Expand Down
23 changes: 23 additions & 0 deletions typedoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = {
out: "docs",
exclude: ["**/node_modules/**", "**/*.spec.ts", "**/*.test.ts"],
name: "@googlemaps/jest-mocks",
excludePrivate: true,
excludeExternals: true,
};

0 comments on commit 05e3e4c

Please sign in to comment.