diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml deleted file mode 100644 index 1b868fd..0000000 --- a/.github/workflows/prod.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: publish - -on: - push: - branches: - - '*' - tags: - - 'v*' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 - with: - version: 6.0.2 - run_install: true - - - run: pnpm lint - - publish-npm: - if: startsWith(github.ref, 'refs/tags/v') - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: 'master' - - - uses: pnpm/action-setup@v2.0.1 - with: - version: 6.0.2 - run_install: true - - - run: pnpm build - - run: | - npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} - pnpm publish \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d000849 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: publish + +on: + push: + tags: + - 'v*' + +jobs: + publish-npm: + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v5 + + - name: set up node and pnpm + run: | + corepack enable + pnpm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" + pnpm config set '//npm.pkg.github.com/:_authToken' "${{ secrets.GITHUB_TOKEN }}" + pnpm i + + - name: build + run: pnpm build + + - name: publish + run: | + pnpm publish --registry https://npm.pkg.github.com --no-git-checks + pnpm publish --registry https://registry.npmjs.org --no-git-checks diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..9133ab2 --- /dev/null +++ b/.npmrc @@ -0,0 +1,4 @@ +engine-strict=true +use-node-version=24.14.1 +node-version=24.14.1 +node-mirror:release=https://nodejs-org.b-cdn.net/download/release/ diff --git a/package.json b/package.json index 332ceda..d3aab51 100644 --- a/package.json +++ b/package.json @@ -44,5 +44,7 @@ }, "dependencies": { "@beyonk/async-script-loader": "^2.2.2" - } + }, + "packageManager": "pnpm@10.33.0", + "repository": "https://github.com/beyonk/svelte-google-analytics.git" }