Merge branch 'main' into develop

# Conflicts:
#	.github/workflows/build-push-windows.yml
#	.github/workflows/create-release.yml
This commit is contained in:
Manuel Mayer
2023-06-07 21:54:46 +02:00
3 changed files with 70 additions and 0 deletions

23
.github/workflows/check-version.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Build Windows Installer
on:
workflow_call:
inputs:
version:
description: 'Version'
required: true
type: string
jobs:
check-release-name:
runs-on: ubuntu-latest
steps:
- name: Check version on update API
run: |
VERSION_CHECK=$(curl -s "https://update.api.macro-deck.app/versionname/validate/${{ inputs.version }}")
if [[ "$VERSION_CHECK" != "true" ]]; then
echo "Version '${{ inputs.version }}' is not valid according to the update API."
exit 1
fi

27
.github/workflows/release-created.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Release Created
on:
release:
types: [published]
jobs:
check_version:
name: Check Version Name
uses: ./.github/workflows/check-version.yml
with:
version: ${{ github.event.release.name }}
tests:
name: Execute Tests
needs: [check_version]
uses: ./.github/workflows/tests.yml
secrets: inherit
release-windows:
name: Build and Push Macro Deck for Windows
uses: ./.github/workflows/build-push-windows.yml
needs: [check_version, tests]
secrets: inherit
with:
version: ${{ github.event.release.name }}
channel: ${{ github.event.release.prerelease && 'Preview' || 'Release' }}