From e92577217aec6a71ff2bd05cd822d919b949e759 Mon Sep 17 00:00:00 2001 From: Victor Uvarov Date: Tue, 13 May 2025 06:56:13 -0700 Subject: [PATCH 1/2] v0.7.0 - scripts to publish to npm and jsr --- .github/workflows/publish.yml | 26 --------------------- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ jsr.json | 2 +- package.json | 2 +- 4 files changed, 45 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 12192ba..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Publish - -on: - push: - branches: - - "v[0-9]+.[0-9]+.[0-9]+*" - -jobs: - publish: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write # The OIDC ID token is used for authentication with JSR. - steps: - - uses: actions/checkout@v4 - - - name: Setup Deno - uses: denoland/setup-deno@v1 - with: - deno-version: v2.x - - - name: Install npm dependencies - run: npm install - - - name: Publish to JSR - run: npx jsr publish --allow-dirty diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..27f2426 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: release + +on: + push: + branches: + - "v[0-9]+.[0-9]+.[0-9]+*" + +jobs: + jsr: + name: publish-to-jsr + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + - name: Install Deno + uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + - run: deno install --no-lock --allow-scripts + - name: Publish to JSR + run: npx jsr publish + npm: + name: publish-to-npm + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/jsr.json b/jsr.json index 3c8d94f..bc34dc4 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@tive/cheddar", - "version": "0.6.14", + "version": "0.7.0", "exports": "./src/index.ts", "publish": { "include": ["jsr.json", "LICENSE", "README.md", "src/**/*.ts"], diff --git a/package.json b/package.json index a10262b..b05fbbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tivetechnology/cheddar-api", - "version": "0.6.14", + "version": "0.7.0", "author": "Victor Uvarov", "repository": { "type": "git", From b833c6fdde0cac65f4b2ab8f993163fa92d91d5a Mon Sep 17 00:00:00 2001 From: Victor Uvarov Date: Tue, 13 May 2025 06:56:59 -0700 Subject: [PATCH 2/2] make sure to build --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27f2426..ddab448 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,7 @@ jobs: node-version: '20.x' registry-url: 'https://registry.npmjs.org' - run: npm ci + - run: npm run build - run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}