diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index c44bf2a..4f0599b 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -4,6 +4,9 @@ on: release: types: [published] +permissions: + contents: write + jobs: publish-release: name: Publish release @@ -11,6 +14,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 + fetch-tags: true - name: Set up Node.js uses: actions/setup-node@v4 @@ -27,6 +34,7 @@ jobs: run: | git config --global user.name "${GITHUB_ACTOR}" git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY - name: Update package.json version run: |