Skip to content

Commit 322189b

Browse files
authored
chore: standardize repos (#380)
1 parent 17182f5 commit 322189b

File tree

4 files changed

+47
-26
lines changed

4 files changed

+47
-26
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 Google LLC
1+
# Copyright 2021 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -22,7 +22,4 @@ jobs:
2222
- run: npm i
2323
- run: npm run lint
2424
- run: npm test
25-
- run: npm run docs
2625
- uses: codecov/codecov-action@v1
27-
with:
28-
fail_ci_if_error: true

.github/workflows/docs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Docs
16+
on: [push, pull_request]
17+
jobs:
18+
test:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- run: |
23+
npm i
24+
npm run docs
25+
- uses: peaceiris/actions-gh-pages@v3
26+
if: github.ref == 'refs/heads/main'
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./docs
30+
user_name: 'googlemaps-bot'
31+
user_email: 'googlemaps-bot@users.noreply.github.com'
32+
commit_message: ${{ github.event.head_commit.message }}

.github/workflows/release.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 Google LLC
1+
# Copyright 2021 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -12,12 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: "Release"
15+
name: Release
1616
on:
1717
push:
1818
branches:
19+
- main
1920
- master
20-
- next
21+
concurrency: release
2122
jobs:
2223
build:
2324
runs-on: ubuntu-latest
@@ -26,28 +27,19 @@ jobs:
2627
- name: Test
2728
run: |
2829
npm i
30+
npm run lint
2931
npm test
3032
- name: Release
3133
uses: cycjimmy/semantic-release-action@v2
3234
with:
3335
extra_plugins: |
34-
"@semantic-release/commit-analyzer"
35-
"@semantic-release/release-notes-generator"
36-
"@semantic-release/git
37-
"@semantic-release/github
38-
"@semantic-release/npm
36+
@semantic-release/commit-analyzer
37+
semantic-release-interval
38+
@semantic-release/release-notes-generator
39+
@semantic-release/git
40+
@semantic-release/github
41+
@semantic-release/npm
42+
@googlemaps/semantic-release-config
3943
env:
4044
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4145
NPM_TOKEN: ${{ secrets.NPM_WOMBAT_TOKEN }}
42-
- run: |
43-
npm i
44-
npm run docs
45-
cp -r dist docs/dist
46-
cp -r examples docs/examples
47-
- uses: peaceiris/actions-gh-pages@v3
48-
with:
49-
github_token: ${{ secrets.GITHUB_TOKEN }}
50-
publish_dir: ./docs
51-
user_name: 'googlemaps-bot'
52-
user_email: 'googlemaps-bot@users.noreply.github.com'
53-
commit_message: ${{ github.event.head_commit.message }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
"dist/*"
2525
],
2626
"scripts": {
27-
"docs": "typedoc src/index.ts",
27+
"docs": "typedoc src/index.ts && cp -r dist docs/dist && cp -r examples docs/examples",
2828
"format": "prettier *.json *.js src/* e2e/* examples/* --write && eslint src/* --fix",
2929
"lint": "eslint src/*",
30-
"prepare": "rollup -c",
30+
"prepare": "rm -rf dist && rollup -c",
3131
"test": "jest src/*",
3232
"test:e2e": "jest e2e/*"
3333
},

0 commit comments

Comments
 (0)