Skip to content
Myr

release.yml

This file

Path

.github/workflows/release.yml

113 lines · 3.9 KiB · YAML

Last changed by

ci: write the tag version into deno.json before publishing to JSR (#5469)Yusuke Wadabefore adoption271dd0b

History of this file

Take it

The walk stopped after 200 commits: lines older than f0b094d point at it.

Merge commit from forkYusuke Wadabefore adoptionf0b094d

lines 1–5why, one step back
1name: release
23on:4 push:5 tags:

feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d

lines 6–7why, one step back
6 - 'v*'
7 - '@hono/*'

Merge commit from forkYusuke Wadabefore adoptionf0b094d

lines 8–12why, one step back
8
9permissions:10 contents: read1112jobs:

ci: publish to npm from CI with OIDC trusted publishing (#5028)Yusuke Wadabefore adoptionc574cf1

lines 13–14why, one step back
13 npm:
14 name: publish-to-npm

feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d

line 15why, one step back
15 if: startsWith(github.ref_name, 'v')

ci: publish to npm from CI with OIDC trusted publishing (#5028)Yusuke Wadabefore adoptionc574cf1

lines 16–30why, one step back
16 runs-on: ubuntu-latest
1718 permissions:19 contents: read20 id-token: write2122 steps:23 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v624 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v625 with:26 node-version-file: '.tool-versions'27 registry-url: 'https://registry.npmjs.org'28 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v229 with:30 bun-version-file: '.tool-versions'

chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55

lines 31–37why, one step back
31 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
32 with:33 cache: true34 run_install: true35 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v636 with:37 node-version-file: '.tool-versions'

ci: publish to npm from CI with OIDC trusted publishing (#5028)Yusuke Wadabefore adoptionc574cf1

line 38why, one step back
38 - run: npm install -g npm@11.17.0

chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55

line 39why, one step back
39 - run: pnpm run build

ci: publish to npm from CI with OIDC trusted publishing (#5028)Yusuke Wadabefore adoptionc574cf1

line 40why, one step back
40 - name: Publish to npm

ci: use npm Staged publishing (#5035)Yusuke Wadabefore adoption9f0dadf

line 41why, one step back
41 run: npm stage publish --provenance --access public

ci: publish to npm from CI with OIDC trusted publishing (#5028)Yusuke Wadabefore adoptionc574cf1

line 42why, one step back
42

Merge commit from forkYusuke Wadabefore adoptionf0b094d

lines 43–44why, one step back
43 jsr:
44 name: publish-to-jsr

feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d

line 45why, one step back
45 if: startsWith(github.ref_name, 'v')

Merge commit from forkYusuke Wadabefore adoptionf0b094d

lines 46–60why, one step back
46 runs-on: ubuntu-latest
4748 permissions:49 contents: read50 id-token: write5152 steps:53 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v654 - name: Install deno55 uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v256 with:57 deno-version-file: '.tool-versions'58 - run: deno install --no-lock --allow-scripts59 - name: Publish to JSR60 run: deno run -A jsr:@david/publish-on-tag@0.1.4

feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d

lines 61–99why, one step back
61
62 adapter:63 name: publish-adapter-to-npm64 if: startsWith(github.ref_name, '@hono/')65 runs-on: ubuntu-latest6667 permissions:68 contents: read69 id-token: write7071 steps:72 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v673 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v674 with:75 node-version-file: '.tool-versions'76 registry-url: 'https://registry.npmjs.org'77 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v278 with:79 bun-version-file: '.tool-versions'80 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.081 with:82 cache: true83 run_install: true84 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v685 with:86 node-version-file: '.tool-versions'87 - run: npm install -g npm@11.17.088 - name: Resolve package from tag89 id: pkg90 run: |91 # tag: @hono/<name>@<version>92 pkg="${GITHUB_REF_NAME%@*}"93 echo "name=$pkg" >> "$GITHUB_OUTPUT"94 echo "dir=adapters/${pkg#@hono/}" >> "$GITHUB_OUTPUT"95 - run: pnpm --filter "${{ steps.pkg.outputs.name }}" run build96 - name: Pack97 run: pnpm --filter "${{ steps.pkg.outputs.name }}" pack --pack-destination "$RUNNER_TEMP"98 - name: Publish to npm99 run: npm stage publish "$RUNNER_TEMP"/*.tgz --provenance --access public

feat(adapters/deno): publish to JSR (#5465)Yusuke Wadabefore adoption1c6e060

lines 100–107why, one step back
100 # Adapters with a deno.json are also published to JSR
101 - uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2102 if: hashFiles(format('{0}/deno.json', steps.pkg.outputs.dir)) != ''103 with:104 deno-version-file: '.tool-versions'105 - name: Publish to JSR106 if: hashFiles(format('{0}/deno.json', steps.pkg.outputs.dir)) != ''107 working-directory: ${{ steps.pkg.outputs.dir }}

ci: write the tag version into deno.json before publishing to JSR (#5469)Yusuke Wadabefore adoption271dd0b

lines 108–113why, one step back
108 # deno.json keeps version 0.0.0 in the repo; write the version from the tag before publishing,
109 # like publish-on-tag does for hono's jsr.json110 run: |111 jq --arg version "${GITHUB_REF_NAME##*@}" '.version = $version' deno.json > deno.json.tmp112 mv deno.json.tmp deno.json113 deno publish --allow-dirty