Unverified Commit 506023b5 authored by Hong Minhee's avatar Hong Minhee
Browse files

Conditional JSR token auth for PR publishing

Configure deno publish to use JSR_TOKEN for pull_request_target events
while maintaining the existing behavior for other events. This ensures
proper authentication when publishing from external pull requests.

[ci skip]
parent 3626b07e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -370,7 +370,13 @@ jobs:
    - run: |
        set -ex
        deno task -f @fedify/fedify codegen
        if [[ "$GITHUB_EVENT_NAME" = "pull_request_target" ]]; then
          deno publish --allow-dirty --no-provenance --token "$JSR_TOKEN"
        else
          deno publish --allow-dirty
        fi
      env:
        JSR_TOKEN: ${{ secrets.JSR_TOKEN }}
    - run: |
        set -ex
        npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"