Skip to content

Commit

Permalink
Fix release uploads and run only if release was created
Browse files Browse the repository at this point in the history
  • Loading branch information
nimrodkor committed Jul 9, 2023
1 parent f9967ca commit 2111c66
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
name: windows
suffix: '.exe'
needs: [github-release]
if: needs.github-release.outputs.upload_url != ''
runs-on: ${{ matrix.os }}
permissions:
contents: write
Expand All @@ -103,17 +104,12 @@ jobs:
pipenv run pip install pyinstaller
- name: Build executable
run: pipenv run pyinstaller checkov.spec
- uses: actions/upload-artifact@v3
with:
name: checkov_${{ matrix.name }}
path: dist/checkov${{ matrix.suffix }}
if-no-files-found: error
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.github-release.outputs.upload_url }}
asset_path: ./checkov_${{ matrix.name }}${{ matrix.suffix }}
asset_path: dist/checkov${{ matrix.suffix }}
asset_name: checkov_${{ matrix.name }}_${{ needs.github-release.outputs.version }}
asset_content_type: application/zip

0 comments on commit 2111c66

Please sign in to comment.