mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 08:28:19 +01:00
ci(build): 💚 Hopefully fix deployment CI
This commit is contained in:
parent
028915f6c6
commit
d01ed19a66
22
.github/workflows/publish.yml
vendored
22
.github/workflows/publish.yml
vendored
|
|
@ -39,14 +39,10 @@ jobs:
|
|||
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
|
||||
- name: Create bunfig.toml with NPM token (GitHub Secrets)
|
||||
run: echo -e "[install]\nregistry = { url = \"https://registry.npmjs.org/\", token = \"${{ secrets.NPM_TOKEN }}\" }" > bunfig.toml
|
||||
|
||||
- name: Copy bunfig.toml to package directory
|
||||
run: cp bunfig.toml ${{ github.event.inputs.package }}/bunfig.toml
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
# Code is not minified and bundled anymore
|
||||
#- name: Build
|
||||
|
|
@ -55,14 +51,10 @@ jobs:
|
|||
- name: Change version in package.json to ${{ github.event.inputs.version }}, defaulting to the truncated commit hash
|
||||
run: 'sed -i ''s/"version": ".*"/"version": "${{ github.event.inputs.version }}"/'' package.json ${{ github.event.inputs.package }}/package.json ${{ github.event.inputs.package }}/jsr.jsonc'
|
||||
|
||||
- name: CD to package directory
|
||||
run: cd ${{ github.event.inputs.package }} && bun install --frozen-lockfile
|
||||
|
||||
- name: Patch Bunpublish to not break
|
||||
run: sed -i --follow-symlinks 's/getHeapStatistics().heap_size_limit/99999999/g' "node_modules/@npmcli/arborist/lib/packument-cache.js"
|
||||
|
||||
- name: Publish to NPM
|
||||
run: cd ${{ github.event.inputs.package }} && bunx @morlay/bunpublish --provenance --tag ${{ github.event.inputs.tag }}
|
||||
run: cd ${{ github.event.inputs.package }} && npm publish --provenance --tag ${{ github.event.inputs.tag }} --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Publish to JSR
|
||||
run: cd ${{ github.event.inputs.package }} && bunx jsr publish --allow-slow-types --allow-dirty
|
||||
|
|
|
|||
Loading…
Reference in a new issue