Skip to content

Commit

Permalink
Merge pull request #20 from Stassi/feature/npm-publish
Browse files Browse the repository at this point in the history
feature/npm-publish
  • Loading branch information
Stassi authored Sep 18, 2024
2 parents 5b24a45 + 09f5a96 commit a5bd1ba
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Node.js setup ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
cache: 'npm'
cache: npm
cache-dependency-path: package-lock.json
node-version: ${{ matrix.node-version }}

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: npm publish

on:
pull_request:
types: [ closed ]

jobs:
publish-npm:
if: github.event.pull_request.merged
runs-on: ubuntu-latest

steps:
- name: Repository checkout
uses: actions/checkout@v4

- name: Node.js setup
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: package-lock.json
node-version: 20.17.x

- name: Dependencies installation
run: npm ci

- env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Publish to npm
run: npm publish
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stassi/leaf",
"version": "0.0.19",
"version": "0.0.20",
"private": true,
"description": "Leaflet adapter.",
"keywords": [
Expand Down Expand Up @@ -32,6 +32,7 @@
"preimport:leaflet:fullscreen": "shx mkdir -p public/leaflet/fullscreen",
"import:leaflet:fullscreen": "shx cp -r node_modules/leaflet-fullscreen/dist/* public/leaflet/fullscreen",
"lint": "eslint .",
"prepublishOnly": "npm test",
"serve": "serve",
"serve:test": "serve -p 3001",
"prestart": "npm run build",
Expand Down

0 comments on commit a5bd1ba

Please sign in to comment.