LANCommander/.github/workflows/LANCommander.Release.yml
2024-10-03 20:26:05 -05:00

218 lines
No EOL
7.8 KiB
YAML

name: LANCommander Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
prep:
runs-on: windows-latest
outputs:
version_tag: ${{ steps.trim_tag_ref.outputs.replaced }}
steps:
- uses: frabert/replace-string-action@v2
name: Trim Tag Ref
id: trim_tag_ref
with:
string: '${{ github.ref }}'
pattern: 'refs/tags/v'
replace-with: ''
# Server
build_server_linux-arm64:
needs: prep
uses: ./.github/workflows/LANCommander.Server.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-arm64
build_arch: arm64
build_platform: Linux
build_server_linux-x64:
needs: prep
uses: ./.github/workflows/LANCommander.Server.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-x64
build_arch: x64
build_platform: Linux
build_server_osx-arm64:
needs: prep
uses: ./.github/workflows/LANCommander.Server.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-arm64
build_arch: arm64
build_platform: macOS
build_server_osx-x64:
needs: prep
uses: ./.github/workflows/LANCommander.Server.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-x64
build_arch: x64
build_platform: macOS
build_server_win-arm64:
needs: prep
uses: ./.github/workflows/LANCommander.Server.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-arm64
build_arch: arm64
build_platform: Windows
build_server_win-x64:
needs: prep
uses: ./.github/workflows/LANCommander.Server.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-x64
build_arch: x64
build_platform: Windows
# Launcher
build_launcher_linux-arm64:
needs: prep
uses: ./.github/workflows/LANCommander.Launcher.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-arm64
build_arch: arm64
build_platform: Linux
build_launcher_linux-x64:
needs: prep
uses: ./.github/workflows/LANCommander.Launcher.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: linux-x64
build_arch: x64
build_platform: Linux
build_launcher_osx-arm64:
needs: prep
uses: ./.github/workflows/LANCommander.Launcher.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-arm64
build_arch: arm64
build_platform: macOS
build_launcher_osx-x64:
needs: prep
uses: ./.github/workflows/LANCommander.Launcher.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: osx-x64
build_arch: x64
build_platform: macOS
build_launcher_win-arm64:
needs: prep
uses: ./.github/workflows/LANCommander.Launcher.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-arm64
build_arch: arm64
build_platform: Windows
build_launcher_win-x64:
needs: prep
uses: ./.github/workflows/LANCommander.Launcher.yml
with:
version_tag: ${{ needs.prep.outputs.version_tag }}
build_runtime: win-x64
build_arch: x64
build_platform: Windows
build_release:
runs-on: windows-latest
needs: [build_server_linux-arm64, build_server_linux-x64, build_server_osx-arm64, build_server_osx-x64, build_server_win-arm64, build_server_win-x64, build_launcher_linux-arm64, build_launcher_linux-x64, build_launcher_osx-arm64, build_launcher_osx-x64, build_launcher_win-arm64, build_launcher_win-x64]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: frabert/replace-string-action@v2
name: Trim Tag Ref
id: trim_tag_ref
with:
string: '${{ github.ref }}'
pattern: 'refs/tags/v'
replace-with: ''
- uses: frabert/replace-string-action@v2
name: Swap Path Backslashes
id: swap_path_backslashes
with:
string: '${{ github.workspace }}'
pattern: '\\'
replace-with: '/'
flags: g
# Draft Release
- name: Download Server Linux ARM64
uses: actions/download-artifact@v3
with:
name: LANCommander.Server-Linux-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Server Linux x64
uses: actions/download-artifact@v3
with:
name: LANCommander.Server-Linux-x64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Server macOS ARM64
uses: actions/download-artifact@v3
with:
name: LANCommander.Server-macOS-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Server macOS x64
uses: actions/download-artifact@v3
with:
name: LANCommander.Server-macOS-x64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Server Windows ARM64
uses: actions/download-artifact@v3
with:
name: LANCommander.Server-Windows-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Server Windows x64
uses: actions/download-artifact@v3
with:
name: LANCommander.Server-Windows-x64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Launcher Linux ARM64
uses: actions/download-artifact@v3
with:
name: LANCommander.Launcher-Linux-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Launcher Linux x64
uses: actions/download-artifact@v3
with:
name: LANCommander.Launcher-Linux-x64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Launcher macOS x64
uses: actions/download-artifact@v3
with:
name: LANCommander.Launcher-macOS-x64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Launcher macOS ARM64
uses: actions/download-artifact@v3
with:
name: LANCommander.Launcher-macOS-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Launcher Windows ARM64
uses: actions/download-artifact@v3
with:
name: LANCommander.Launcher-Windows-arm64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Download Launcher Windows x64
uses: actions/download-artifact@v3
with:
name: LANCommander.Launcher-Windows-x64-v${{ steps.trim_tag_ref.outputs.replaced }}.zip
- name: Draft Release
uses: softprops/action-gh-release@v2
with:
name: v${{ steps.trim_tag_ref.outputs.replaced }}
generate_release_notes: true
draft: true
files: |
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Server-Windows-arm64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Server-Windows-x64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Server-Linux-x64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Server-Linux-arm64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Server-macOS-arm64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Server-macOS-x64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Launcher-Windows-arm64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Launcher-Windows-x64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Launcher-Linux-x64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Launcher-Linux-arm64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Launcher-macOS-arm64-*.zip
${{ steps.swap_path_backslashes.outputs.replaced }}/LANCommander.Launcher-macOS-x64-*.zip