Sync GitHub Actions workflow with dev branch

This commit is contained in:
GriffinR 2025-04-01 21:50:33 -04:00
parent 83a57c145c
commit 9d77af6f20

View File

@ -9,32 +9,26 @@ on:
tags:
- '*'
pull_request:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-qt5-linux:
build-linux:
strategy:
matrix:
qtversion: [5.14.2, 6.8.2]
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v4
with:
version: '5.14.2'
modules: 'qtwidgets qtqml'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
version: ${{ matrix.qtversion }}
modules: 'qtcharts'
cache: 'true'
- name: Configure
run: qmake porymap.pro
@ -43,23 +37,22 @@ jobs:
run: make
build-macos:
runs-on: macos-latest
strategy:
matrix:
os: [macos-latest, macos-13]
runs-on: ${{ matrix.os }}
env:
BUILD_NAME: porymap-${{ matrix.os }}-${{ github.ref_name }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
version: '6.2.*'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
version: '6.8.2'
modules: 'qtcharts'
cache: 'true'
- name: Configure
run: qmake -config release porymap.pro
@ -74,19 +67,19 @@ jobs:
- name: Prep Release Directory
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir porymap-macOS-${{ github.ref_name }}
cp porymap.dmg porymap-macOS-${{ github.ref_name }}/porymap.dmg
cp RELEASE-README.txt porymap-macOS-${{ github.ref_name }}/README.txt
mkdir $BUILD_NAME
cp porymap.dmg $BUILD_NAME/porymap.dmg
cp RELEASE-README.txt $BUILD_NAME/README.txt
- name: Bundle Release Directory
if: startsWith(github.ref, 'refs/tags/')
run: zip -r porymap-macOS-${{ github.ref_name }}.zip porymap-macOS-${{ github.ref_name }}
run: zip -r $BUILD_NAME.zip $BUILD_NAME
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: porymap-macOS-${{ github.ref_name }}.zip
files: $BUILD_NAME.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -94,7 +87,7 @@ jobs:
runs-on: windows-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dsaltares/fetch-gh-release-asset@master
if: steps.cache-static-qt.outputs.cache-hit != 'true'
@ -152,7 +145,7 @@ jobs:
run: powershell.exe -Command "Compress-Archive -Path porymap-windows-${{ github.ref_name }} -DestinationPath porymap-windows-${{ github.ref_name }}.zip"
- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: porymap-windows-${{ github.ref_name }}.zip