Skip to content
Open
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
40 changes: 9 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,25 @@ name: publish

on:
push:
branches:
- '*'
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: dependencies
run: |
npm i -g corepack@latest
corepack enable
corepack install
pnpm i

- run: pnpm lint
- run: pnpm test
- run: pnpm build

- name: publish a canary
run: pnpx pkg-pr-new publish

publish-npm:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: checkout
uses: actions/checkout@v5

- name: dependencies
- name: set up node and pnpm
run: |
npm i -g corepack@latest
corepack enable
corepack install
pnpm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
pnpm config set '//npm.pkg.github.com/:_authToken' "${{ secrets.GITHUB_TOKEN }}"
pnpm i

- run: |
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
pnpm publish
- name: publish
run: |
pnpm publish --registry https://npm.pkg.github.com --no-git-checks
pnpm publish --registry https://registry.npmjs.org --no-git-checks
6 changes: 3 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use-node-version=22.14.0
node-version=22.14.0
engine-strict=true
resolution-mode=highest
use-node-version=24.14.1
node-version=24.14.1
node-mirror:release=https://nodejs-org.b-cdn.net/download/release/
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@
"vanilla",
"beyonk"
],
"packageManager": "pnpm@10.7.0",
"packageManager": "pnpm@10.33.0",
"dependencies": {
"js-cookie": "^3.0.5",
"uid": "1"
}
},
"repository": "https://github.com/beyonk/gdpr-cookie-consent-banner.git"
}