diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 416005e..66fa02f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,15 +1,18 @@ name: CI -on: [push] +on: + pull_request: + push: + branches: [ 'master' ] jobs: Build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v5 + - uses: actions/setup-node@v6 with: - node-version: 14 + node-version: ${{ vars.NODE_VERSION }} - name: Install dependencies run: npm install - name: Test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..833cf57 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish + +on: + release: + types: [created] + workflow_dispatch: + +env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v6 + with: + node-version: ${{ vars.NODE_VERSION }} + registry-url: https://registry.npmjs.org + - name: Install Dependencies + run: npm ci + - name: Test + run: npm run test + - name: Publish + run: npm publish --access public diff --git a/package.json b/package.json index 5efa0a5..71c72a3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "event-kit", + "name": "@pulsar-edit/event-kit", "version": "2.5.3", "description": "Simple library for implementing and consuming evented APIs", "main": "./dist/event-kit", @@ -11,10 +11,10 @@ }, "repository": { "type": "git", - "url": "https://github.com/atom/event-kit.git" + "url": "https://github.com/pulsar-edit/event-kit.git" }, "bugs": { - "url": "https://github.com/atom/event-kit/issues" + "url": "https://github.com/pulsar-edit/event-kit/issues" }, "license": "MIT", "devDependencies": {