Skip to content

chore: release v4.0.0-beta.6 #18

chore: release v4.0.0-beta.6

chore: release v4.0.0-beta.6 #18

Workflow file for this run

name: Release v3 or v4 NPM package
on:
push:
tags:
- 'v3*'
- 'v4*'
jobs:
publish-v3:
if: startsWith(github.ref_name, 'v3')
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.9
registries: |
https://registry.npmjs.org/
- name: Setup node for npm OIDC
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24.x
- name: bun install
run: bun install --frozen-lockfile
- name: global bun build
run: bun run build
- name: bun build
run: bun run build
working-directory: packages/utils-legacy
- name: bun test
run: bun run test
working-directory: packages/utils-legacy
- name: ensure correct package name
run: bun pm pkg set name="@swrlab/utils"
working-directory: packages/utils-legacy
- name: ensure correct package name for new package (to prevent errors)
run: bun pm pkg set name="@swrlab/utils-new"
working-directory: packages/utils
- name: create tarball
run: bun pm pack
working-directory: packages/utils-legacy
- name: npm publish legacy
run: npm publish --access public --provenance --tag legacy *.tgz
working-directory: packages/utils-legacy
publish-v4:
if: startsWith(github.ref_name, 'v4')
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.9
registries: |
https://registry.npmjs.org/
- name: Setup node for npm OIDC
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24.x
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
with:
node-version: '24'
cache: true
- run: vp install --frozen-lockfile
- run: vp lint
- run: vp run test
- name: bun build
run: bun run build
working-directory: packages/utils
- name: bun test
run: bun run test
working-directory: packages/utils
- name: create tarball
run: bun pm pack
working-directory: packages/utils
- name: npm publish latest
run: npm publish --access public --provenance --tag latest *.tgz
working-directory: packages/utils
- name: create github release
run: gh release create ${{ github.ref_name }} --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}