gha: fix github token providing for assets upload (#4703)

This commit is contained in:
Paweł Redzyński
2020-10-12 18:18:20 +03:00
committed by GitHub
parent 4e53491f5c
commit 549f342db9
+6 -4
View File
@@ -9,8 +9,6 @@ jobs:
linux: linux:
runs-on: ubuntu-16.04 runs-on: ubuntu-16.04
steps: steps:
- name: set up environment variables
run: echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> $GITHUB_ENV
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Set up Python 3.7 - name: Set up Python 3.7
uses: actions/setup-python@v1 uses: actions/setup-python@v1
@@ -22,6 +20,8 @@ jobs:
ruby-version: 2.4 ruby-version: 2.4
- name: Build - name: Build
run: ./scripts/build_posix.sh run: ./scripts/build_posix.sh
- name: set up github token
run: echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> $GITHUB_ENV
- name: Publish deb - name: Publish deb
if: github.event_name == 'release' if: github.event_name == 'release'
uses: actions/[email protected] uses: actions/[email protected]
@@ -52,10 +52,11 @@ jobs:
ruby-version: 2.4 ruby-version: 2.4
- name: Build - name: Build
run: ./scripts/build_posix.sh run: ./scripts/build_posix.sh
- name: set up github token
run: echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> $GITHUB_ENV
- name: Publish - name: Publish
if: github.event_name == 'release' if: github.event_name == 'release'
uses: actions/[email protected] uses: actions/[email protected]
run: echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> $GITHUB_ENV
with: with:
upload_url: ${{ github.event.release.upload_url }} upload_url: ${{ github.event.release.upload_url }}
asset_path: dvc-${{ github.event.release.tag_name }}.pkg asset_path: dvc-${{ github.event.release.tag_name }}.pkg
@@ -72,10 +73,11 @@ jobs:
- name: Build - name: Build
run: scripts\build_windows.cmd run: scripts\build_windows.cmd
shell: cmd shell: cmd
- name: set up github token
run: echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> $GITHUB_ENV
- name: Publish - name: Publish
if: github.event_name == 'release' if: github.event_name == 'release'
uses: actions/[email protected] uses: actions/[email protected]
run: echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' >> $GITHUB_ENV
with: with:
upload_url: ${{ github.event.release.upload_url }} upload_url: ${{ github.event.release.upload_url }}
asset_path: dvc-${{ github.event.release.tag_name }}.exe asset_path: dvc-${{ github.event.release.tag_name }}.exe