Skip to content

Commit 4949021

Browse files
ci(deploy): persist GH token credential
1 parent c379682 commit 4949021

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v2
2929
with:
30-
persist-credentials: false
30+
token: ${{ secrets.GH_TOKEN }}
31+
persist-credentials: true
3132

3233
- name: Set up Python
3334
uses: actions/setup-python@v2
@@ -65,7 +66,7 @@ jobs:
6566
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
6667
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6768
run: |
68-
echo ::set-output name=IS_NEW_RELEASE::$(npx semantic-release --dry-run | grep -c -i "Published release")
69+
echo "IS_NEW_RELEASE=$(npx semantic-release --dry-run | grep -c -i "Published release")" >> $GITHUB_OUTPUT
6970
echo "The full TAG - ${{ github.ref }}"
7071
7172
- name: Get the nextRelease.version from semantic release
@@ -74,7 +75,7 @@ jobs:
7475
env:
7576
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
7677
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
77-
run: echo ::set-output name=NEXT_RELEASE::$(npx semantic-release --dry-run | grep -oP "Published release \K[0-9]+\.[0-9]+\.[0-9]+")
78+
run: echo "NEXT_RELEASE=$(npx semantic-release --dry-run | grep -oP "Published release \K[0-9]+\.[0-9]+\.[0-9]+")" >> $GITHUB_OUTPUT
7879

7980
- name: Publish to Git Releases and Tags
8081
if: ${{ steps.is_new_release.outputs.IS_NEW_RELEASE == '1' }}

0 commit comments

Comments
 (0)