Nightlies

Contributes to CURA-9494
This commit is contained in:
Jelle Spijker 2023-08-19 03:22:19 +02:00
parent ddc4ec473e
commit 28afca187c
No known key found for this signature in database
GPG Key ID: 034D1C0527888B65

View File

@ -24,6 +24,16 @@ on:
default: false
required: true
type: boolean
nightly:
description: 'Upload to nightly release'
default: false
required: true
type: boolean
env:
CURA_CONAN_VERSION: ${{ inputs.cura_conan_version }}
ENTERPRISE: ${{ inputs.enterprise }}
STAGING: ${{ inputs.staging }}
jobs:
windows-installer:
@ -80,3 +90,94 @@ jobs:
architecture: ARM64
operating_system: self-hosted
secrets: inherit
update-nightly-release:
runs-on: ubuntu-latest
needs: [ windows-installer, linux-modern-installer, linux-legacy-installer, macos-installer, macos-arm-installer ]
steps:
- name: Output the name file name and extension
id: filename
shell: python
run: |
import os
enterprise = "-Enterprise" if "${{ inputs.enterprise }}" == "true" else ""
linux_modern = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-modern-X64-AppImage"
linux_legacy = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-linux-X64-AppImage"
mac_x64_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-dmg"
mac_x64_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-X64-pkg"
mac_arm_dmg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-dmg"
mac_arm_pkg = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-macos-ARM64-pkg"
win_msi = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-msi
win_exe = installer_filename = f"UltiMaker-Cura-{os.getenv('CURA_VERSION_FULL')}{enterprise}-win64-X64-exe"
output_env = os.environ["GITHUB_OUTPUT"]
content = ""
if os.path.exists(output_env):
with open(output_env, "r") as f:
content = f.read()
with open(output_env, "w") as f:
f.write(content)
f.writelines(f"LINUX_MODERN={linux_modern}\n")
f.writelines(f"LINUX_LEGACY={linux_legacy}\n")
f.writelines(f"MAC_X64_DMG={mac_x64_dmg}\n")
f.writelines(f"MAC_X64_PKG={mac_x64_pkg}\n")
f.writelines(f"MAC_ARM_DMG={mac_arm_dmg}\n")
f.writelines(f"MAC_ARM_PKG={mac_arm_pkg}\n")
f.writelines(f"WIN_MSI={win_msi}\n")
f.writelines(f"WIN_EXE={win_exe}\n")
- name: Download linux modern installer jobs artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.filename.outputs.LINUX_MODERN }}
path: installers
- name: Download linux legacy installer jobs artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.filename.outputs.LINUX_LEGACY }}
path: installers
- name: Download mac x64 dmg installer jobs artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.filename.outputs.MAC_X64_DMG }}
path: installers
- name: Download mac x64 pkg installer jobs artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.filename.outputs.MAC_X64_PKG }}
path: installers
- name: Download mac arm dmg installer jobs artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.filename.outputs.MAC_ARM_DMG }}
path: installers
- name: Download mac arm pkg installer jobs artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.filename.outputs.MAC_ARM_PKG }}
path: installers
- name: Download win msi installer jobs artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.filename.outputs.WIN_MSI }}
path: installers
- name: Download win exe installer jobs artifacts
uses: actions/download-artifact@v2
with:
name: ${{ steps.filename.outputs.WIN_EXE }}
path: installers
- name: Update nightly release
uses: pyTooling/Actions/releaser@main
with:
tag: nightly
rm: true
token: ${{ secrets.GITHUB_TOKEN }}
files: installers/*.*