File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed
Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change 11name : Release
2+
23on :
34 push :
45 branches :
1213 - name : Checkout repository
1314 uses : actions/checkout@v4
1415
15- - name : Use node .js
16+ - name : Use Node .js
1617 uses : actions/setup-node@v4
1718 with :
1819 node-version : ' 20.x'
2728 with :
2829 path : |
2930 **/node_modules
30- key : ${{runner.OS}}-${{hashFiles('**/pnpm-lock.yaml')}}
31+ key : ${{ runner.OS }}-${{ hashFiles('**/pnpm-lock.yaml') }}
3132
3233 - name : Installing Dependencies
3334 if : steps.cache-dependencies.outputs.cache-hit != 'true'
3839
3940 - name : Running Build
4041 run : pnpm run build
41-
42- - name : Debug - Check GITHUB_TOKEN
43- run : echo "GITHUB_TOKEN is set: ${{ secrets.GHP_TOKEN != '' }}"
42+
43+ - name : Check if GHP_TOKEN is Set and Valid
44+ env :
45+ GITHUB_TOKEN : ${{ secrets.GHP_TOKEN }}
46+ run : |
47+ if [ -z "$GITHUB_TOKEN" ]; then
48+ echo "❌ GHP_TOKEN is not set!"
49+ exit 1
50+ fi
51+
52+ echo "✅ GHP_TOKEN is set. Testing against GitHub API..."
53+
54+ curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user | jq .
55+
56+ if [ $? -ne 0 ]; then
57+ echo "❌ Failed to access GitHub API with GHP_TOKEN"
58+ exit 1
59+ else
60+ echo "✅ Successfully accessed GitHub API with GHP_TOKEN"
61+ fi
4462
4563 - name : Create Release Pull Request or Publish
4664 id : changesets
5270 title : ' Changesets: versioning & publish'
5371 env :
5472 GITHUB_TOKEN : ${{ secrets.GHP_TOKEN }}
55- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
73+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments