diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1c57fa1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,37 @@ +name: NPM Publish + +on: + release: + types: [created] + workflow_dispatch: + +env: + NODE_VERSION: 20 + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Install dependencies + run: npm install + - name: Test + run: npm test + + publish: + needs: test + 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/ + - name: Install dependencies + run: npm ci + - name: Publish + run: npm publish --access public diff --git a/package.json b/package.json index 24f55fe..18bf8c8 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - "name": "underscore-plus", + "name": "@pulsar-edit/underscore-plus", "version": "1.7.0", "description": "Underscore plus additional utilities", "licenses": [ { "type": "MIT", - "url": "http://github.com/atom/underscore-plus/raw/master/LICENSE.md" + "url": "http://github.com/pulsar-edit/underscore-plus/raw/master/LICENSE.md" } ], "main": "./lib/underscore-plus.js", @@ -20,10 +20,10 @@ }, "repository": { "type": "git", - "url": "https://github.com/atom/underscore-plus.git" + "url": "https://github.com/pulsar-edit/underscore-plus.git" }, "bugs": { - "url": "https://github.com/atom/underscore-plus/issues" + "url": "https://github.com/pulsar-edit/underscore-plus/issues" }, "keywords": [ "underscore"