Skip to content

Commit e9bfe7b

Browse files
committed
Excludes docs from npm package except README
Prevents markdown files from being ignored during npm publish while ensuring README is included for package documentation. Bumps package version to reflect change.
1 parent d623d3a commit e9bfe7b

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
id-token: write # Required for OIDC
11+
contents: read
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: '25'
22+
registry-url: 'https://registry.npmjs.org'
23+
scope: \@${{ github.repository_owner }}
24+
25+
- name: Update npm
26+
run: npm install -g npm@latest
27+
- run: npm ci
28+
- run: npm run build
29+
- run: npm publish --access public

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
src/
22
.editorconfig
33
*.md
4-
4+
!README.md

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@libsrcdev/gatsby-remark-shiki",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "This plugin uses shiki to add code highlighting to pages that are built with gatsby-transformer-remark.",
55
"keywords": [
66
"gatsby",

0 commit comments

Comments
 (0)