Open rrd108 opened 5 months ago
@brenoepics can you look into this. I have tried quite a few variations but it always fails
Hi, what is wrong with this?
the jsr publish fails. I modified a lot but still fails with different errors.
For example: https://github.com/rrd108/vue-mess-detector/actions/runs/11221618034/job/31192321609
I fixed the action in a fork and managed to publish it, I've never used jsr, I don't know if I'm doing it wrong, but I believe that pnpm, npm... doesn't recognize @username/package
as a command and tries to download it from npm central.
example
npx jsr add @brenoepics/testing
npx @brenoepics/testing analyze
Upon observing this, I thought about searching for jsr commands to see if there were any similar to a dlx, unfortunately, there aren't, I found an issue related to this. https://github.com/jsr-io/jsr/issues/157
https://jsr.io/docs/publishing-packages#publishing-from-github-actions
Here is the detailed info how to do this
publishing is easy, actually it was just missing the node setup step, but running bin commands seems not possible. working example:
name: JSR Publish
on:
release:
types: [ created ]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # The OIDC ID token is used for authentication with JSR.
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
- run: |
yarn install
npx jsr publish --allow-dirty
on the new release it did not detected the version number bump, so the publish did not happened.
The version bump was in the same commit as the tag/release? as far as I remember, there are 3 release events: (or 4 idk if synchronize is one of them)
release:
types: [created, edited, published]
if the bump tag is in the same commit, you might want the published one?
no, the bump comes after the tag release
As I see it works but we are one relaese behind on jsr
I think I should change the jsr.json update in my release script, but I am nt sure how
https://jsr.io/@rrd/vue-mess-detector