8181 uses : actions/setup-node@v4
8282 with :
8383 node-version : ${{ inputs.nodejs_version }}
84+ registry-url : ' https://npm.pkg.github.com'
8485
8586 - name : check if local version differs from latest published version
8687 id : check-version
88+ env :
89+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8790 run : |
8891 published_version=$(npm view @nhsdigital/nhs-notify-event-schemas-supplier-api --json 2>/dev/null | jq -r '.["dist-tags"].latest // "null"')
8992 echo "Published version: $published_version"
99102 echo "version_changed=true" >> $GITHUB_OUTPUT
100103 fi
101104
102- test-contract-provider :
105+ test-contract :
103106 name : " Test contracts (provider)"
104107 needs : check-event-schemas-version-change
105108 if : needs.check-event-schemas-version-change.outputs.version_changed == 'true'
@@ -114,18 +117,21 @@ jobs:
114117 uses : actions/setup-node@v4
115118 with :
116119 node-version : ${{ inputs.nodejs_version }}
120+ registry-url : ' https://npm.pkg.github.com'
117121 - name : " Install dependencies"
122+ env :
123+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
118124 run : npm ci
119125 - name : " Run provider contract tests"
120- run : make test-contract-provider
126+ run : make test-contract
121127 env :
122128 GITHUB_PACKAGES_TOKEN : ${{ secrets.GITHUB_TOKEN }}
123129
124130 publish-event-schemas :
125131 name : Publish event schemas package to GitHub package registry
126132 needs :
127133 - check-event-schemas-version-change
128- - test-contract-provider
134+ - test-contract
129135 if : needs.check-event-schemas-version-change.outputs.version_changed == 'true'
130136 runs-on : ubuntu-latest
131137 permissions :
@@ -143,6 +149,8 @@ jobs:
143149 registry-url : ' https://npm.pkg.github.com'
144150
145151 - name : Install dependencies
152+ env :
153+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
146154 run : npm ci
147155
148156 - name : Publish to GitHub Packages
0 commit comments