mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 16:38:20 +01:00
refactor(build): 💚 Use NPM to publish package in Actions
This commit is contained in:
parent
43a8132a6a
commit
8ce0e58c03
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
|
|
@ -38,6 +38,10 @@ jobs:
|
||||||
|
|
||||||
- uses: oven-sh/setup-bun@v1
|
- uses: oven-sh/setup-bun@v1
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "22"
|
||||||
|
|
||||||
- name: Create bunfig.toml with NPM token (GitHub Secrets)
|
- 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
|
run: echo -e "[install]\nregistry = { url = \"https://registry.npmjs.org/\", token = \"${{ secrets.NPM_TOKEN }}\" }" > bunfig.toml
|
||||||
|
|
||||||
|
|
@ -51,7 +55,7 @@ jobs:
|
||||||
run: 'sed -i ''s/"version": ".*"/"version": "${{ github.event.inputs.version }}"/'' package.json ${{ github.event.inputs.package }}/package.json ${{ github.event.inputs.package }}/jsr.jsonc'
|
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: Publish to NPM
|
- name: Publish to NPM
|
||||||
run: bunx @morlay/bunpublish --provenance --tag ${{ github.event.inputs.tag }}
|
run: npm publish --access public --tag ${{ github.event.inputs.tag }} --registry https://registry.npmjs.org/ --provenance ${{ github.event.inputs.package }}
|
||||||
|
|
||||||
- name: Publish to JSR
|
- name: Publish to JSR
|
||||||
run: cd ${{ github.event.inputs.package }} && bunx jsr publish --allow-slow-types --allow-dirty
|
run: cd ${{ github.event.inputs.package }} && bunx jsr publish --allow-slow-types --allow-dirty
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue