File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 run : git tag -d beta
2020 continue-on-error : true
2121
22- - run : npx changelogithub # or changelogithub@0.12 if ensure the stable result
22+ - name : Verify release token
2323 env :
24- GITHUB_TOKEN : ${{secrets.MY_TOKEN}}
24+ GH_TOKEN : ${{ secrets.MY_TOKEN }}
25+ TAG_NAME : ${{ github.ref_name }}
26+ run : |
27+ if [ -z "$GH_TOKEN" ]; then
28+ echo "::error::MY_TOKEN is not configured"
29+ exit 1
30+ fi
31+ curl --fail-with-body --silent --show-error \
32+ --header "Authorization: Bearer ${GH_TOKEN}" \
33+ --header "Accept: application/vnd.github+json" \
34+ --header "X-GitHub-Api-Version: 2022-11-28" \
35+ "https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}" \
36+ >/dev/null
37+
38+ - name : Create GitHub release
39+ run : npx --yes changelogithub@13.16.1
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.MY_TOKEN }}
You can’t perform that action at this time.
0 commit comments