ci: only fetch tags for releases

This commit is contained in:
Tyler Wilding 2023-07-19 21:44:20 -04:00 committed by refractionpcsx2
parent 822b166753
commit 7d9ad6daab
5 changed files with 33 additions and 9 deletions

View File

@ -28,10 +28,14 @@ on:
required: false
type: boolean
default: false
patches_url:
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
jobs:
build_linux:
@ -49,7 +53,7 @@ jobs:
# it doesn't fetch tags, therefore we don't get a version. So grab them manually.
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch tags
id: fetch-tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Prepare Artifact Metadata
@ -73,7 +77,7 @@ jobs:
- name: Download patches
run: |
cd bin/resources
aria2c -Z "${{ inputs.patches_url }}/patches.zip"
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
- name: Generate AppStream XML
run: |

View File

@ -28,10 +28,14 @@ on:
required: false
type: string
default: ""
patches_url:
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
jobs:
build_linux:
@ -54,6 +58,7 @@ jobs:
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Prepare Artifact Metadata
@ -99,7 +104,7 @@ jobs:
- name: Download patches
run: |
cd bin/resources
aria2c -Z "${{ inputs.patches_url }}/patches.zip"
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
- name: Generate CMake
env:

View File

@ -10,10 +10,14 @@ on:
required: false
type: string
default: macos-13
patches_url:
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
jobs:
build_macos:
@ -37,6 +41,7 @@ jobs:
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Use Xcode 14.3.1
@ -81,7 +86,7 @@ jobs:
- name: Download patches
run: |
cd bin/resources
aria2c -Z "${{ inputs.patches_url }}/patches.zip"
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
- name: Prepare ccache timestamp

View File

@ -68,6 +68,7 @@ jobs:
draft: true
prerelease: true
tag_name: ${{ steps.tag_version.outputs.new_tag }}
# Build Everything
# Linux
build_linux_qt:
@ -81,6 +82,7 @@ jobs:
compiler: clang
cmakeflags: ""
buildAppImage: true
fetchTags: true
secrets: inherit
build_linux_flatpak:
@ -95,6 +97,7 @@ jobs:
cmakeflags: ""
branch: "stable"
publish: false
fetchTags: true
secrets: inherit
# Windows
@ -109,6 +112,7 @@ jobs:
configuration: CMake
buildSystem: cmake
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
fetchTags: true
secrets: inherit
# MacOS
@ -120,6 +124,7 @@ jobs:
uses: ./.github/workflows/macos_build.yml
with:
jobName: "MacOS Build"
fetchTags: true
secrets: inherit
# Upload the Artifacts

View File

@ -37,10 +37,14 @@ on:
required: false
type: string
default: 3rdparty\qt\6.5.0\msvc2022_64
patches_url:
patchesUrl:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
fetchTags:
required: false
type: boolean
default: false
jobs:
build_windows_qt:
@ -59,6 +63,7 @@ jobs:
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}
run: git fetch --tags --no-recurse-submodules
- name: Prepare Artifact Metadata
@ -91,7 +96,7 @@ jobs:
shell: cmd
run: |
cd bin/resources
aria2c -Z "${{ inputs.patches_url }}/patches.zip"
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
- name: Generate CMake
if: inputs.configuration == 'CMake'