4141 name : Snapit
4242 if : ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '/snapit' }}
4343 runs-on : ubuntu-latest
44+ permissions :
45+ contents : read
46+ pull-requests : write
47+ id-token : write
4448 steps :
4549 # WARNING: DO NOT RUN ANY CUSTOM LOCAL SCRIPT BEFORE RUNNING THE SNAPIT ACTION
4650 # This action can be executed by 3rd party users and it should not be able to run arbitrary code from a PR.
7175 build_script : " pnpm nx run-many --target=bundle --all --skip-nx-cache --output-style=stream && pnpm refresh-manifests"
7276 env :
7377 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
78+ NPM_TOKEN : ' '
79+ NPM_CONFIG_PROVENANCE : true
7580 SHOPIFY_CLI_BUILD_REPO : ${{ github.repository }}
7681
7782 # Changeset release job - runs on push to main or stable branches
8085 if : ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag == '') }}
8186 runs-on : ubuntu-latest
8287 permissions :
83- contents : write
88+ contents : read
8489 pull-requests : write
8590 id-token : write
8691 steps :
99104 title : Version Packages - ${{ github.ref_name }}
100105 publish : pnpm release latest
101106 env :
102- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
107+ NPM_TOKEN : ' '
103108 NPM_CONFIG_PROVENANCE : true
104109 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
105110 SHOPIFY_CLI_BUILD_REPO : ${{ github.repository }}
@@ -110,7 +115,7 @@ jobs:
110115 if : ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '') }}
111116 runs-on : ubuntu-latest
112117 permissions :
113- contents : write
118+ contents : read
114119 pull-requests : write
115120 id-token : write
116121 steps :
@@ -122,16 +127,10 @@ jobs:
122127 uses : ./.github/actions/setup-cli-deps
123128 with :
124129 node-version : 24.1.0
125- - name : Creating .npmrc
126- run : |
127- cat << EOF > "$HOME/.npmrc"
128- //registry.npmjs.org/:_authToken=$NPM_TOKEN
129- EOF
130- env :
131- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
132130 - name : Release
133131 run : pnpm release ${{ github.event.inputs.tag || 'nightly' }}
134132 env :
135133 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
134+ NPM_TOKEN : ' '
136135 NPM_CONFIG_PROVENANCE : true
137136 SHOPIFY_CLI_BUILD_REPO : ${{ github.repository }}
0 commit comments