Browse Source

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.
pull/400/head
Apparatus_Zero 4 years ago committed by GitHub
parent
commit
c2d8d4f475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/build.yml

4
.github/workflows/build.yml

@ -165,13 +165,13 @@ jobs:
tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }} tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }}
body: ${{ steps.release_description.outputs.data }} body: ${{ steps.release_description.outputs.data }}
env: env:
GITHUB_TOKEN: ${{ secrets.PAT }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload setup - name: Upload setup
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == '' if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
env: env:
GITHUB_TOKEN: ${{ secrets.PAT }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/Release/ep_setup.exe asset_path: ./build/Release/ep_setup.exe

Loading…
Cancel
Save