Japanese addresses v2 (#238) #774
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: build | |
on: | |
push: | |
branches: | |
- master | |
tags: ['*'] | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: "ビルド・リント" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build | |
- run: npm run lint | |
test: | |
name: "テスト" | |
needs: | |
- build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
node-version: [18.x, 22.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run lint | |
- run: npm test | |
# アドレステストは時間かかるし、環境依存が無いので、matrixにいれる必要無い | |
test-addresses: | |
name: "詳細住所テスト" | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build | |
- run: npm run test:addresses | |
publish: | |
name: 'npm 公開' | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup .npmrc file to publish to npm | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@geolonia' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build | |
- run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |