Skip to content

Commit

Permalink
ci(release): add NPM provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Nov 30, 2023
1 parent a5984d5 commit 96e4826
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [main]

permissions:
id-token: write

jobs:
release-please:
runs-on: ubuntu-latest
Expand All @@ -26,12 +29,12 @@ jobs:
with:
node-version: "lts/*"
cache: "npm"
registry-url: "https://registry.npmjs.org"

- name: Build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci
npm run build
- uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
npm publish --provenance --access public
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"scripts": {
"build": "rimraf css && sass -I node_modules sass:css --no-source-map --style=compressed",
"build:pages": "npm run build && tailwindcss -mo preview/style.css",
"preview": "serve preview"
"preview": "serve preview",
"prepare": "npm run build"
},
"devDependencies": {
"@catppuccin/palette": "^0.2.0",
Expand Down

0 comments on commit 96e4826

Please sign in to comment.