Skip to content

Commit

Permalink
maybe fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
29cmb committed Jul 29, 2024
1 parent 08f545f commit 0e01f4e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Run workflow to build
- name: Run "Create .love file and build to .exe" workflow
uses: convictional/trigger-workflow-and-wait@v1.6.1
with:
owner: ${{ github.repository_owner }}
Expand All @@ -29,12 +29,20 @@ jobs:

- name: Download artifact
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: Game Build
path: ./release-artifacts

- name: Check if artifact was downloaded
id: check_files
uses: andstor/file-existence-action@v2
with:
files: "./release-artifacts/Game Build.zip"

- name: Create Release
id: create_release
if: steps.check_files.outputs.files_exists == 'true'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
Expand All @@ -45,11 +53,18 @@ jobs:
prerelease: false

- name: Upload Release Asset
if: steps.check_files.outputs.files_exists == 'true'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release-artifacts/Game Build.zip
asset_name: GameBuild-${{ github.event.inputs.version }}.zip
asset_content_type: application/zip
asset_content_type: application/zip

- name: Notify about missing artifact
if: steps.check_files.outputs.files_exists == 'false'
run: |
echo "The Game Build artifact was not found. Please check the 'Create .love file and build to .exe' workflow."
exit 1

0 comments on commit 0e01f4e

Please sign in to comment.