Skip to content

chore: make test.yml workflow reusable (#17) #32

chore: make test.yml workflow reusable (#17)

chore: make test.yml workflow reusable (#17) #32

Workflow file for this run

# Copyright 2023 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: Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Test
run: |
npm ci
npm run test
- name: Release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19
extra_plugins: |
@semantic-release/commit-analyzer@^9
semantic-release-interval
@semantic-release/release-notes-generator@^10
@semantic-release/git
@semantic-release/github@^8
@semantic-release/npm@^9
@googlemaps/semantic-release-config
semantic-release-npm-deprecate
env:
GH_TOKEN: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
NPM_TOKEN: ${{ secrets.NPM_WOMBAT_TOKEN }}
NODE_OPTIONS: "--max_old_space_size=4096"
RUNNER_DEBUG: 1