Skip to content

Compile & Release

Compile & Release #10

name: Compile & Release
on:
# Trigger the workflow manually from the Actions tab
workflow_dispatch:
inputs:
release:
description: Release-Version (leave empty to skip Release)
default: ""
release_name:
description: Release-Name
default: ""
jobs:
compile_and_release:
runs-on: ubuntu-latest
permissions:
contents: write
env:
LOVE_VERSION: '11.5'
LOVE_PKG_WIN64: "https://github.com/love2d/love/releases/download/${{ env.LOVE_VERSION }}/love-${{ env.LOVE_VERSION }}-win64.zip"

Check failure on line 23 in .github/workflows/compile_and_release.yml

View workflow run for this annotation

GitHub Actions / Compile & Release

Invalid workflow file

The workflow is not valid. .github/workflows/compile_and_release.yml (Line: 23, Col: 23): Unrecognized named-value: 'env'. Located at position 1 within expression: env.LOVE_VERSION
RELEASE_FILE_LOVE: "blobbyvolley-${{ github.event.inputs.release || 'latest' }}.love"
RELEASE_FILE_WIN64: "blobbyvolley-${{ github.event.inputs.release || 'latest' }}-win64.zip"
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- name: Create directories
run: |
mkdir -p .build/win64/
mkdir -p .release/
- name: Create .love release file
run: |
7z a -tzip .release/$RELEASE_FILE_LOVE ./*
- name: Download LÖVE for Windows
run: |
wget -O win64.zip $LOVE_PKG_WIN64
7z x win64.zip -o .build/win64/
rm win64.zip
- name: Create win64 release file
run: |
cat .build/win64/love.exe .release/$RELEASE_FILE_LOVE > .build/win64/blobbyvolley.exe
7z a -tzip .release/$RELEASE_FILE_WIN64 .build/win64/* -x!love.exe
- name: Save .love release file as artifact
uses: actions/upload-artifact@v4
with:
path: .release/${{ env.RELEASE_FILE_LOVE }}
name: ${{ env.RELEASE_FILE_LOVE }} # Default is 'artifact'
retention-days: 30
- name: Save win64 release file as artifact
uses: actions/upload-artifact@v4
with:
path: .release/${{ env.RELEASE_FILE_WIN64 }}
name: ${{ env.RELEASE_FILE_WIN64 }} # Default is 'artifact'
retention-days: 30
- name: Release
if: ${{ github.event.inputs.release != '' }}
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ github.event.inputs.release }}
name: "Version ${{ github.event.inputs.release }}: ${{ github.event.inputs.release_name }}"
generate_release_notes: true
files: .release/*