Skip to content

Commit

Permalink
Merge pull request #7 from pulsar-edit/auto-publish
Browse files Browse the repository at this point in the history
Setup automated publishing to NPM
  • Loading branch information
confused-Techie authored Feb 1, 2025
2 parents 40bf113 + 99c1dbb commit 990d8cc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: NPM Publish

on:
release:
types: [created]
workflow_dispatch:

env:
NODE_VERSION: 16
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
- run: npm test

publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ spec
.travis.yml
.npmignore
npm-debug.log
.github/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "less-cache",
"name": "@pulsar-edit/less-cache",
"version": "2.0.1",
"description": "Less compile cache",
"main": "./src/less-cache",
Expand Down

0 comments on commit 990d8cc

Please sign in to comment.