From c2d8d4f475c558c355596e0f9332f774b9a84482 Mon Sep 17 00:00:00 2001 From: Apparatus_Zero <29201475+BraINstinct0@users.noreply.github.com> Date: Wed, 17 Nov 2021 12:08:22 +0900 Subject: [PATCH] Use GITHUB_TOKEN instead of PAT in build 1) GITHUB_TOKEN is created on virtual env startup(for Actions), used , and destroyed, reducing possibility of PAT leak. So it is better for security. 2) Even when the repo is forked the build will work, so it'll reduce steps for manual edit&compile. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e050d1..61084c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -165,13 +165,13 @@ jobs: tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }} body: ${{ steps.release_description.outputs.data }} env: - GITHUB_TOKEN: ${{ secrets.PAT }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload setup uses: actions/upload-release-asset@v1 if: github.ref == 'refs/heads/master' && github.event.inputs.ref == '' env: - GITHUB_TOKEN: ${{ secrets.PAT }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./build/Release/ep_setup.exe