mirror of https://github.com/PCSX2/pcsx2.git
107 lines
3.1 KiB
YAML
107 lines
3.1 KiB
YAML
name: 🏭 Release Pipeline
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
# Build Everything
|
|
# Linux
|
|
build_linux_qt:
|
|
if: github.repository == 'PCSX2/pcsx2'
|
|
name: "Linux"
|
|
uses: ./.github/workflows/linux_build_qt.yml
|
|
with:
|
|
jobName: "AppImage Build"
|
|
compiler: clang
|
|
cmakeflags: ""
|
|
buildAppImage: true
|
|
secrets: inherit
|
|
build_linux_flatpak:
|
|
if: github.repository == 'PCSX2/pcsx2'
|
|
name: "Linux"
|
|
uses: ./.github/workflows/linux_build_flatpak.yml
|
|
with:
|
|
jobName: "Flatpak Build"
|
|
compiler: clang
|
|
cmakeflags: ""
|
|
branch: "stable"
|
|
publish: false
|
|
secrets: inherit
|
|
|
|
# Windows
|
|
build_windows_qt:
|
|
if: github.repository == 'PCSX2/pcsx2'
|
|
name: "Windows"
|
|
uses: ./.github/workflows/windows_build_qt.yml
|
|
with:
|
|
jobName: "Windows Build"
|
|
configuration: CMake
|
|
buildSystem: cmake
|
|
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
|
|
secrets: inherit
|
|
|
|
# MacOS
|
|
build_macos_qt:
|
|
if: github.repository == 'PCSX2/pcsx2'
|
|
name: "MacOS"
|
|
uses: ./.github/workflows/macos_build.yml
|
|
with:
|
|
jobName: "MacOS Build"
|
|
secrets: inherit
|
|
|
|
# Upload the Artifacts
|
|
upload_artifacts:
|
|
if: github.repository == 'PCSX2/pcsx2'
|
|
needs:
|
|
- build_linux_flatpak
|
|
- build_linux_qt
|
|
- build_windows_qt
|
|
- build_macos_qt
|
|
name: "Upload Artifacts"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Prepare Artifact Folder
|
|
run: mkdir ./ci-artifacts/
|
|
|
|
- uses: actions/download-artifact@v3
|
|
name: Download all Artifacts
|
|
with:
|
|
path: ./ci-artifacts/
|
|
|
|
- name: Display structure of downloaded files
|
|
run: ls ./ci-artifacts/
|
|
|
|
# Prepare artifacts, they are all zips from github!
|
|
- name: Prepare Artifacts
|
|
working-directory: ./ci-artifacts/
|
|
run: for d in *windows*/; do 7z a "${d}asset.7z" ./$d/*; done
|
|
|
|
# Artifact Naming:
|
|
# MacOS: PCSX2-<tag>-macOS-[additional hyphen seperated tags]
|
|
# Windows|Linux: PCSX2-<tag>-<windows|linux>-<32bit|64bit>--[additional hyphen seperated tags]
|
|
- name: Name and Upload the Release Assets
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAG: ${{ github.REF }}
|
|
SCAN_DIR: ${{ github.WORKSPACE }}/ci-artifacts
|
|
OUT_DIR: ${{ github.WORKSPACE }}/ci-artifacts/out
|
|
run: |
|
|
gh release list --repo PCSX2/pcsx2
|
|
mkdir -p ${{ github.WORKSPACE }}/ci-artifacts/out
|
|
python ./.github/workflows/scripts/releases/rename-release-assets.py
|
|
ls ${{ github.WORKSPACE }}/ci-artifacts/out
|
|
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
|
|
gh release upload "${TAG_VAL}" ${{ github.WORKSPACE }}/ci-artifacts/out/* --repo PCSX2/pcsx2 --clobber
|
|
|
|
- name: Publish Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
|
|
run: |
|
|
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
|
|
gh release edit ${TAG_VAL} --draft=false --repo PCSX2/pcsx2
|
|
|