Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/npm-publish.yml

This file was deleted.

17 changes: 11 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,28 @@ on:
branches:
- master

permissions:
id-token: write # required for trusted publishing
contents: read

jobs:
publish-npm:
if: contains(github.event.head_commit.message, 'chore(release)')
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
node-version: 18.17.1
node-version: '20'
registry-url: https://registry.npmjs.org/

- name: Install npm
run: npm install -g npm@">=11.5.1" # trusted publishing requires 11.5.1 or later

- name: Install dependencies
run: npm install

Expand All @@ -28,5 +35,3 @@ jobs:

- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"author": "ButterCMS <support@buttercms.com>",
"repository": {
"type": "git",
"url": "git://github.com/buttercms/buttercms-js.git"
"url": "git+https://github.com/ButterCMS/buttercms-js.git"
},
"main": "dist/butter.umd.cjs",
"module": "dist/butter.esm.js",
Expand Down