2022-05-14 05:57:56 +00:00
|
|
|
name: 🏭 Release Pipeline
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Build Everything
|
|
|
|
# Linux
|
2022-12-03 22:08:05 +00:00
|
|
|
build_linux_qt:
|
2022-07-02 04:00:56 +00:00
|
|
|
if: github.repository == 'PCSX2/pcsx2'
|
2022-12-03 22:08:05 +00:00
|
|
|
name: "Linux"
|
2022-07-02 04:00:56 +00:00
|
|
|
uses: ./.github/workflows/linux_build_qt.yml
|
|
|
|
with:
|
|
|
|
jobName: "Qt"
|
|
|
|
compiler: clang
|
|
|
|
cmakeflags: ""
|
|
|
|
buildAppImage: true
|
|
|
|
secrets: inherit
|
|
|
|
|
2022-12-03 22:08:05 +00:00
|
|
|
# Windows
|
|
|
|
build_windows_qt:
|
2022-07-02 04:00:56 +00:00
|
|
|
if: github.repository == 'PCSX2/pcsx2'
|
2022-12-03 22:08:05 +00:00
|
|
|
name: "Windows"
|
|
|
|
uses: ./.github/workflows/windows_build_qt.yml
|
2022-07-02 04:00:56 +00:00
|
|
|
with:
|
2022-12-03 22:08:05 +00:00
|
|
|
jobName: Qt
|
|
|
|
configuration: CMake
|
|
|
|
buildSystem: cmake
|
2023-03-30 02:56:43 +00:00
|
|
|
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
|
2022-07-02 04:00:56 +00:00
|
|
|
secrets: inherit
|
|
|
|
|
2022-05-14 05:57:56 +00:00
|
|
|
# MacOS
|
2022-05-26 05:30:00 +00:00
|
|
|
build_macos_qt:
|
|
|
|
if: github.repository == 'PCSX2/pcsx2'
|
|
|
|
name: "MacOS"
|
|
|
|
uses: ./.github/workflows/macos_build.yml
|
|
|
|
with:
|
|
|
|
jobName: "Qt"
|
|
|
|
gui: "Qt"
|
2022-05-14 05:57:56 +00:00
|
|
|
secrets: inherit
|
|
|
|
|
|
|
|
# Upload the Artifacts
|
|
|
|
upload_artifacts:
|
|
|
|
if: github.repository == 'PCSX2/pcsx2'
|
|
|
|
needs:
|
2022-12-03 22:08:05 +00:00
|
|
|
- build_linux_qt
|
|
|
|
- build_windows_qt
|
2022-05-26 05:30:00 +00:00
|
|
|
- build_macos_qt
|
2022-05-14 05:57:56 +00:00
|
|
|
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/
|
2022-05-22 19:34:05 +00:00
|
|
|
run: for d in *windows*/; do 7z a "${d}asset.7z" ./$d/*; done
|
2022-05-14 05:57:56 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|