Skip to content

Remove extra data from metadata #801

Remove extra data from metadata

Remove extra data from metadata #801

Workflow file for this run

# 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 lint
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- uses: actions/upload-pages-artifact@v3
if: github.ref == 'refs/heads/master'
with:
path: demo
deploy-pages:
name: "GitHub Pages へのデプロイ"
runs-on: ubuntu-latest
needs:
- build
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/deploy-pages@v4
id: deployment
test:
name: "テスト"
needs:
- build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [18.x, 20.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'
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- run: npm ci
- run: npm test
# 結合テストはビルドされたものが必要
# また、Node.js 18.x では結合テストをスキップする
- name: 結合テスト
if: matrix.node-version != '18.x'
run: npm run test:integration
# アドレステストは時間かかるし、環境依存が無いので、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 }}