Skip to content

chore: release v3.0.1-beta.9 #25

chore: release v3.0.1-beta.9

chore: release v3.0.1-beta.9 #25

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
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
with:
node-version: '24'
cache: true
- name: install dependencies (via vite-plus)
run: vp install --frozen-lockfile
- name: global build
run: vp run build
- name: linting
run: vp run lint
- name: run all tests
run: vp run test
- name: build `utils-legacy`
run: vp run --filter ./packages/utils-legacy build
- name: run tests
run: vp run --filter ./packages/utils-legacy test
- 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
- name: build utils
run: vp run --filter ./packages/utils build
- name: run tests
run: vp run --filter ./packages/utils test
- 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 }}