Unverified Commit 7b5ab419 authored by Hong Minhee's avatar Hong Minhee
Browse files

Do not publish if not main branch

parent f480e7ca
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -125,9 +125,13 @@ jobs:
        files: npm/*.tgz
        generate_release_notes: false
        discussion_category_name: Announcements
    - if: github.event_name == 'push'
    - if: |
        github.event_name == 'push' &&
        github.ref_type == 'tag' || github.ref == 'refs/heads/main'
      run: deno task publish --allow-dirty
    - if: github.event_name == 'push'
    - if: |
        github.event_name == 'push' &&
        github.ref_type == 'tag' || github.ref == 'refs/heads/main'
      run: |
        set -ex
        npm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"