Skip to content

Commit

Permalink
CI: set release channel appropriately when it's a stable release
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Jan 10, 2024
1 parent 426123e commit f6e22dd
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/linux_build_flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ on:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false

jobs:
build_linux:
Expand All @@ -59,6 +63,13 @@ jobs:
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules

- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/linux_build_qt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ on:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false

jobs:
build_linux:
Expand Down Expand Up @@ -72,6 +76,13 @@ jobs:
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules

- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false

jobs:
build_macos:
Expand All @@ -47,6 +51,13 @@ jobs:
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules

- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Use Xcode 14.3.1
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app

Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/release_cut_new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ on:
inputs:
is_prelease:
description: 'Should be a pre-release?'
type: boolean
required: true
default: true
default: 'true'
type: choice
options:
- 'true'
- 'false'
tag_value:
description: 'Create a new release from latest master with the given tag, if this is left blank it will bump the patch version. You dont need to include the "v" prefix'
required: false
Expand Down Expand Up @@ -70,7 +73,7 @@ jobs:
with:
body_path: ./release-notes.md
draft: true
prerelease: ${{ inputs.is_prelease == true || inputs.is_prelease == 'true' }}
prerelease: ${{ github.event_name != 'workflow_dispatch' || inputs.is_prelease == 'true' }}
tag_name: ${{ steps.tag_version.outputs.new_tag }}

- name: Create a GitHub Release (Push)
Expand All @@ -97,6 +100,7 @@ jobs:
cmakeflags: ""
buildAppImage: true
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit

build_linux_flatpak:
Expand All @@ -113,6 +117,7 @@ jobs:
branch: "stable"
publish: false
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit

# Windows
Expand All @@ -129,6 +134,7 @@ jobs:
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit

# MacOS
Expand All @@ -142,6 +148,7 @@ jobs:
jobName: "MacOS Build"
artifactPrefixName: "PCSX2-macos-Qt"
fetchTags: true
stableBuild: ${{ github.event_name == 'workflow_dispatch' && inputs.is_prelease == 'false' }}
secrets: inherit

# Upload the Artifacts
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/windows_build_qt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ on:
required: false
type: boolean
default: false
stableBuild:
required: false
type: boolean
default: false

jobs:
build_windows_qt:
Expand All @@ -61,6 +65,13 @@ jobs:
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules

- name: Add stable release identifier file
if: ${{ inputs.stableBuild == true || inputs.stableBuild == 'true' }}
shell: bash
run: |
echo "#define DEFAULT_UPDATER_CHANNEL \"stable\"" > ./pcsx2-qt/DefaultUpdaterChannel.h
cat ./pcsx2-qt/DefaultUpdaterChannel.h
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
Expand Down

0 comments on commit f6e22dd

Please sign in to comment.