Skip to content

Commit

Permalink
Remove on-push from release, add CI, remove 'prepare'
Browse files Browse the repository at this point in the history
  • Loading branch information
kjrocker committed Sep 14, 2024
1 parent a131bcd commit 5af856b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Deploy to NPM
name: Release

on:
release:
types: [published]
push:
branches:
- main


jobs:
deploy:
Deploy-NPM:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -26,6 +23,7 @@ jobs:
cache: 'npm'

- run: npm ci
- run: npm test && npm run build
- run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
- run: npm publish --provenance --access public
env:
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"scripts": {
"build": "tsc",
"test": "jest",
"test:watch": "jest --watch",
"prepare": "rimraf ./build && npm run test && npm run build"
"test:watch": "jest --watch"
},
"keywords": [
"date",
Expand Down Expand Up @@ -36,4 +35,4 @@
"dependencies": {
"date-fns": "^3.6.0"
}
}
}

0 comments on commit 5af856b

Please sign in to comment.