Skip to content

fixed

fixed #10

Workflow file for this run

name: Publish NPM package
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
generate-library:
name: Generate client library
runs-on: ubuntu-latest
permissions: read-all
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: package.json
cache: npm
- name: Install dependencies
run: npm ci
- name: Generate client libraries
run: npm run build
- name: Copy md files
run: |
cp ./README.md ./dist/README.md &&
cp LICENCE ./dist/LICENCE &&
cp SECURITY.md ./dist/SECURITY.md &&
cp CODE_OF_CONDUCT.md ./dist/CODE_OF_CONDUCT.md &&
cp CONTRIBUTING.md ./dist/CONTRIBUTING.md
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: geojsonjs
path: dist
publish-library:
name: Publish client library
runs-on: ubuntu-latest
needs: [ generate-library ]
permissions:
packages: write
steps:
- name: Download client
uses: actions/download-artifact@v3
with:
name: geojsonjs
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: https://registry.npmjs.org
- name: Publish client library
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}