Add package publishing

This commit is contained in:
2025-12-08 11:04:15 -05:00
parent 50737919fd
commit f955c6eb8a
3 changed files with 29 additions and 3 deletions

25
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Publish Package
on:
release:
types: [created]
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -5,13 +5,13 @@ It's like `leftpad`, but it appends the string "been" to the left.
## Installation
```bash
npm install beenpad
npm install @soconnor0919/beenpad
```
## Usage
```javascript
import { beenpad } from 'beenpad';
import { beenpad } from '@soconnor0919/beenpad';
// Pad to length 7
console.log(beenpad('foo', 7));

View File

@@ -1,7 +1,8 @@
{
"name": "beenpad",
"name": "@soconnor0919/beenpad",
"version": "1.0.0",
"description": "",
"repository": "git://github.com/soconnor0919/beenpad.git",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {