Skip to content

Commit

Permalink
chore: add npm distribution at deno package (#27346)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Dec 12, 2024
1 parent 4cfa340 commit b756463
Show file tree
Hide file tree
Showing 13 changed files with 905 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cargo_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install deno
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Publish
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const installNodeStep = {
const installDenoStep = {
name: "Install Deno",
uses: "denoland/setup-deno@v2",
with: { "deno-version": "v1.x" },
with: { "deno-version": "v2.x" },
};

const authenticateWithGoogleCloud = {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x
- name: Install Python
uses: actions/setup-python@v5
with:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: npm_publish

on:
workflow_dispatch:
inputs:
version:
description: 'Version'
type: string
release:
types: [published]

permissions:
id-token: write

jobs:
build:
name: npm publish
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Configure git
run: |
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'

- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: ./tools/release/npm/build.ts ${{ github.event.inputs.version }} --publish
2 changes: 1 addition & 1 deletion .github/workflows/promote_to_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install deno
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Install rust-codesign
run: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/start_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install deno
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Create Gist URL
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Install deno
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Run version bump
run: |
Expand Down
Loading

0 comments on commit b756463

Please sign in to comment.